Forces the field editor to give up its first responder status and prepares it for its next assignment.
- macOS 10.0+
The object that is using the window’s field editor.
If the field editor is the first responder, it’s made to resign that status even if its
resign method returns
false. This registration forces the field editor to send a
text message to its delegate. The field editor is then removed from the view hierarchy, its delegate is set to
nil, and it’s emptied of any text it may contain.
This method is typically invoked by the object using the field editor when it’s finished. Other objects normally change the first responder by simply using
make, which allows a field editor or other object to retain its first responder status if, for example, the user has entered an invalid value. The
end method should be used only as a last resort if the field editor refuses to resign first responder status. Even in this case, you should always allow the field editor a chance to validate its text and take whatever other action it needs first. You can do this by first trying to make the
NSWindow object the first responder: