Contents

canBecomeFirstResponder

Returns a Boolean value indicating whether this object can become the first responder.

Declaration

var canBecomeFirstResponder: Bool { get }

Return Value

true if the responder can become the first responder; otherwise, false.

Discussion

This method returns false by default. Subclasses must override this method and return true to be able to become first responder.

Don’t call this method on a view that’s not currently in the active view hierarchy. The result is undefined.

See Also

Managing the responder chain