View Full Version : About keypad of simultor not closed

Nov 27, 2008, 06:07 AM

I cant find any close or doe button in the keypad of my simulator.So how can i close my keypad after i entered the text.

Nov 27, 2008, 09:42 AM
[yourTextField resignFirstResponder];

See also: textFieldShouldReturn in UITextFieldDelegate (https://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITextFieldDelegate_Protocol/UITextFieldDelegate/UITextFieldDelegate.html).

Dec 5, 2008, 05:48 AM
Is there any return button on your keypad?
If it is, then first you have to set delegate of textfield then in textFielShouldReturn delegate method you can use
[yourTextField resignFirstResponder];
so whenever you will click on return button your keyboard will closed.

Dec 5, 2008, 01:55 PM
if she is using a numberpad keyboard layout, there is no return button (stupid,yes). you would need to add another button somewhere on the screen and that would call resign. similar to how you would use UITextView