Instance Method

textFieldDidBeginEditing(_:)

Tells the delegate that editing began in the specified text field.

Declaration

optional func textFieldDidBeginEditing(_ textField: UITextField)

Parameters

textField

The text field in which an editing session began.

Discussion

This method notifies the delegate that the specified text field just became the first responder. Use this method to update state information or perform other tasks. For example, you might use this method to show overlay views that are visible only while editing.

Implementation of this method by the delegate is optional.

See Also

Managing Editing

func textFieldShouldBeginEditing(UITextField)

Asks the delegate if editing should begin in the specified text field.

func textFieldShouldEndEditing(UITextField)

Asks the delegate if editing should stop in the specified text field.

func textFieldDidEndEditing(UITextField, reason: UITextFieldDidEndEditingReason)

Tells the delegate that editing stopped for the specified text field.

func textFieldDidEndEditing(UITextField)

Tells the delegate that editing stopped for the specified text field.

enum UITextFieldDidEndEditingReason

Constants indicating the reason why editing ended in a text field.