3

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.

Chameleon
  • 1,608
  • 3
  • 21
  • 39
  • Do you want the text to be selectable at all? – xTwisteDx Feb 02 '20 at 04:40
  • `textFieldName.isUserInteractionEnabled = false` – xTwisteDx Feb 02 '20 at 04:48
  • Does this answer your question? [How to disable UITextField editing but still accept touch?](https://stackoverflow.com/questions/9116969/how-to-disable-uitextfield-editing-but-still-accept-touch) – Keshu R. Feb 02 '20 at 05:14
  • 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 Feb 02 '20 at 08:13

1 Answers1

1

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)

Chameleon
  • 1,608
  • 3
  • 21
  • 39