Search Your Question

What are UITextField delegate methods?

Ans : 

Copy from Apple Developer Site : Link


Managing Editing

func textFieldShouldBeginEditing(UITextField) -> Bool
Asks the delegate if editing should begin in the specified text field.
func textFieldDidBeginEditing(UITextField)
Tells the delegate that editing began in the specified text field.
func textFieldShouldEndEditing(UITextField) -> Bool
Asks the delegate if editing should stop in the specified text field. 
func textFieldDidEndEditing(UITextField, reason: UITextField.DidEndEditingReason)
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 UITextField.DidEndEditingReason
Constants indicating the reason why editing ended in a text field.

Editing the Text Field’s Text

func textFieldShouldClear(UITextField) -> Bool
Asks the delegate if the text field’s current contents should be removed.
func textFieldShouldReturn(UITextField) -> Bool
Asks the delegate if the text field should process the pressing of the return button.

No comments:

Post a Comment

Thanks