Re: Dismissing the iPhone keyboard
Re: Dismissing the iPhone keyboard
- Subject: Re: Dismissing the iPhone keyboard
- From: Bertil Holmberg <email@hidden>
- Date: Fri, 3 Apr 2009 20:31:31 +0200
I think you are using this in the wrong order; "This method
[textFieldDidEndEditing:] is called after the text field resigns its
first responder status."
How do you move the cursor outside the text field?
Dave Mark handles this in his excellent book by using an invisible
background view that accepts touches and sends the resignFirstResponder.
You may also want to implement the [optional] textFieldShouldReturn:
to handle touches in the Done button. Like this:
// Asked when the delegate should process the Return/Done button
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == self.titleField) {
// Remove the keyboard and save the new/modified text
[self.titleField resignFirstResponder];
[self saveAction:self];
}
return YES;
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
[textField resignFirstResponder];
}
and the matching method for the textview
I have set the delegate in IB and yet the note is never sent.
I can't figure out what I'm doing wrong.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden