Hi, I am using a UITextView and I am confused about making the keyboard to disappear. Do I need to use some kind of a notification to make it disappear. Thanks
+1
A:
It's not very intuitive, but all you have to do is implement the doneButtonOnKeyboardPressed
event in your view controller. You don't actually have to do anything inside of the event handler, just handling it will cause the keyboard to disappear after the user taps "Done".
An empty handler will look something like this:
- (IBAction) doneButtonOnKeyboardPressed:(id)sender {
}
bcwood
2009-08-26 02:46:55
Hey Thanks for the reply. It worked. You mentioned that it is not very intuitive. Can you please tell whether there is any other control I can use for multiple line input in iPhone. Thanks
Felix
2009-08-26 21:18:33
Nope, this is pretty much what we're stuck with. There's a lot about the iPhone SDK that isn't exactly intuitive.
bcwood
2009-08-27 14:42:05
A related question is: how do I get the "Done" key to appear on my keyboard? I don't appear to have one.
MusiGenesis
2010-10-26 15:18:33
@musigenesis: Its a property of the UITextField, "Return key".
grilix
2010-10-27 12:01:07