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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to