Contents

canResignFirstResponder

Returns a Boolean value indicating whether the responder is willing to relinquish first-responder status.

Declaration

var canResignFirstResponder: Bool { get }

Return Value

true if the responder can resign first-responder status; otherwise, false.

Discussion

This method returns true by default. You can override this method in your custom responders and return a different value if needed. For example, a text field containing invalid content might want to return false to ensure that the user corrects that content first.

See Also

Managing the responder chain