1
votes

Simply how do we prevent this pop up menu when UITextField text is selected.

enter image description here

Desired functionality:

user can tap either field and edit text. When field is tapped and textField is empty, i have text generated then textfield.selectAll(self). This is the point that the menu pops up.

How to disable UITextField editing but still accept touch? answers do not resolve this issue nor allow user to still use the textField.

1
Do you want the text to be selectable at all? - xTwisteDx
textFieldName.isUserInteractionEnabled = false - xTwisteDx
No, I want user to be able to select text and edit. But I have zero use for “copy,paste,cut,lookup...” options. This pop up menu is just clutter - Chameleon

1 Answers

1
votes

Found the response:

https://stackoverflow.com/a/21716228/2129911

When using textField.selectAll(), passing the textField's delegate makes the pop up menu appear.

For no popup menu use textField.selectAll(nil)