Contents

textShouldBeginEditing(_:)

Requests permission to begin editing a text object.

Declaration

func textShouldBeginEditing(_ textObject: NSText) -> Bool

Parameters

  • textObject:

    The object to begin editing.

Return Value

true if editing can begin; otherwise, false.

Discussion

If the text field isn’t editable, this method returns false immediately. If the text field is editable and its delegate responds to control(_:textShouldBeginEditing:), this method invokes that method and returns the result. Otherwise, it returns true to allow editing to occur. See NSControl for more information about the text delegate method.

See Also

Implementing Delegate Methods