Reputation: 427
I've got an app with user input to enter some numbers and instead of having to push the done key on the keyboard to hide it I'd like for the keyboard to go away when they press the calculate button but I have not been able to figure out how to do this. Some hints please? Thanks
Upvotes: 2
Views: 1511
Reputation: 3391
In iOS you need to "resign" from being first responder in order for the keyboard to be removed from the screen. Simply call resignFirstResponder on your textfield:
[_yourTextFieldWithNumbers resignFirstResponder];
Upvotes: 3