Notifies the receiver that it’s been asked to relinquish its status as first responder.


- (BOOL)resignFirstResponder

Return Value

YES if the text view will resign first responder, NO otherwise.


If the object that will become the new first responder is a text view attached to the same layout manager as the receiver, this method returns YES with no further action. Otherwise, this method sends a textShouldEndEditing: message to its delegate (if any). If the delegate returns NO, this method returns NO. If the delegate returns YES, this method hides the selection highlighting and posts an NSTextDidEndEditingNotification to the default notification center and then returns YES.

Use the NSWindow method makeFirstResponder:, not this method, to make a text view the first responder. Never invoke this method directly.

See Also

Changing First Responder Status

- becomeFirstResponder

Informs the receiver that it’s becoming the first responder.