Monday, September 16, 2024
HomeIOS Developmentios - present edit menu in UITextView programatically?

ios – present edit menu in UITextView programatically?


I’ve an UITextView and a textual content copied to the buffer.
If I click on on a cursor it can present me Edit Menu with Paste, AutoFill, and many others.

The query is: the way to present this menu with very same choices programatically.

I attempted with UIMenuController.shared and showMenu(from:) but it surely would not present Paste possibility. If I click on on cursor – it can.
Additionally I attempted to simply put an area as a textual content after which preselect it – did not work.

So I wish to present an UITextView and to point out this Edit Menu mechanically with out ready consumer to really faucet on the cursor.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments