Contents

textShouldEndEditing(_:)

Invoked from a text object’s implementation of Resignfirstresponder(), this method requests permission for aTextObject to end editing.

Declaration

@MainActor optional func textShouldEndEditing(_ textObject: NSText) -> Bool

Discussion

If the delegate returns true, the text object proceeds to finish editing and resign first responder status. If the delegate returns false, the text object selects all of its text and remains the first responder.

See Also

Related Documentation

Editing text