• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dismissing the iPhone keyboard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Create a folder as a package/bundle ...
  • Next by Date: Re: hung in read$UNIX2003
  • Previous by thread: Re: Dismissing the iPhone keyboard
  • Next by thread: hung in read$UNIX2003
  • Index(es):
    • Date
    • Thread