Instance Method

resignFirstResponder()

Notifies this object that it has been asked to relinquish its status as first responder in its window.

Declaration

func resignFirstResponder() -> Bool

Discussion

The default implementation returns true, resigning first responder status. You can override this method in your custom responders to update your object's state or perform other actions, such as removing the highlight from a selection. You can also return false, refusing to relinquish first responder status. If you override this method, you must call super (the superclass implementation) at some point in your code.

See Also

Managing the Responder Chain

var next: UIResponder?

Returns the next responder in the responder chain, or nil if there is no next responder.

var isFirstResponder: Bool

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

var canBecomeFirstResponder: Bool

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

func becomeFirstResponder()

Asks UIKit to make this object the first responder in its window.

var canResignFirstResponder: Bool

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