Double-tap to activate a UITextField?

Is there a way to make UITextField activate when double-tapped? Single-tapping makes it a little too easy to do something calamitous in my app.

If single-tapping on a text field in your app can be calamitous I'd say your app isn't designed properly. You need to revisit the user experience.

Also, since text fields exist across the entire OS and users expect them to be activated when they single-tap them, changing this just for your app will ruin a user's 'muscle memory' and give them a poor experience.

What @darkpaw said is important. Do not change TextField behaviour.

But you can do something if you really need.

  • Subclass TextField (call it ControlledTextField for instance).
  • add an activation button on the side
  • TextField is editable only when activated
  • So, that will be some kind of double tap, or trigger and fire.

Hope that helps.

Double-tap to activate a UITextField?
 
 
Q