textView(_:editMenuForTextInRanges:suggestedActions:)
Declaration
optional func textView(_ textView: UITextView, editMenuForTextInRanges ranges: [NSValue], suggestedActions: [UIMenuElement]) -> UIMenu?Parameters
- textView:
The text view requesting the menu.
- ranges:
The text ranges for which the menu is presented for.
- suggestedActions:
The actions and commands that the system suggests.
Return Value
Return a UIMenu describing the desired menu hierarchy. Return @c nil to present the default system menu.
Discussion
Asks the delegate for the menu to be shown for the specified text ranges.
If the delegate does not implement this method then the textView:editMenuForTextInRange:suggestedActions: method will be called and passed the union range instead. If the delegate also does not implement that method then nil is assumed.