Search code examples
xcodeeventsuibuttonuitextfieldsimulate

Simulate UITextField touch by UIButton


Is there anyway to fire the "touch on UITextField" event? Because I would like to place a button that, if pressed, sets the focus on a specific UITextField and starts editing.

Thanks.


Solution

  • Call [textField becomeFirstResponder]; when user pressed on the button you want.