Contents

selectTextForEditMenuWithLocation(inView:completionHandler:)

Indicates the edit menu displays at the given location in the text input view’s coordinate space.

Declaration

func selectTextForEditMenuWithLocation(inView locationInView: CGPoint, completionHandler: @escaping  @Sendable (Bool, String?, NSRange) -> Void)
func selectTextForEditMenuWithLocation(inView locationInView: CGPoint) async -> (Bool, String?, NSRange)

Discussion

The completion handler arguments are:

  • A Boolean value that indicates whether the menu displays

  • A string that represents the text context around the updated selection range (generally, this encompasses the paragraph containing the selection range)

  • The range of the updated selection relative to the paragraph context

See Also

Managing the edit menu