Domanda

I would like to know if you can call the return (enter) key of the UIkeyboard programmatically. I have created a paste method which pastes a cached value into a UITextField, what I want to do then is go to the next UITextField.

I can do this if I hit the enter key on the UIkeyboard I was woundering if I can programmatically use the enter key.

È stato utile?

Soluzione

Why not use UIResponder to jump to the next text field? https://developer.apple.com/library/ios/documentation/uikit/reference/UIResponder_Class/Reference/Reference.html

As to simulate key press, his might help http://blog.lazerwalker.com/blog/2013/10/17/more-fun-with-simulated-ios-events-keypresses/ But he uses private apis, and it only works before iOS7.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top