I have a UITextField, which uses a number pad to take input. How can I dismiss it/run a method call when two digits have been entered into the textField?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- back button text does not change
相关文章
- 现在使用swift开发ios应用好还是swift?
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- How do you detect key up / key down events from a
Use the text field delegate method:
Here you can determine the proposed change to the text field - if the change is that the second character should be added, you can resign first responder. You should also return YES or directly set the text field's value so that the second character is updated.
Good point in the comments though - this might not be the best user experience!