Questions tagged [uitextfielddelegate]

The methods declared by the UITextFieldDelegate protocol allow the adopting delegate to respond to messages from the UITextField class.

The methods declared by the UITextFieldDelegate protocol allow the adopting delegate to respond to messages from the UITextField class. On UITextFieldDelegate, you can find the following methods:

Managing Editing

– textFieldShouldBeginEditing:

– textFieldDidBeginEditing:

– textFieldShouldEndEditing:

– textFieldDidEndEditing:

Editing the Text Field’s Text

– textField:shouldChangeCharactersInRange:replacementString:

– textFieldShouldClear:

– textFieldShouldReturn:

574 questions
-4
votes
1 answer

How to unwrap textfield.text without using the " ! " - Swift 3

I've been searching stackoverflow and would like to know what the best practice is to unwrap the textfield.text optional without force unwrapping. It works doing this, but I've been told to never force unwrap. But when I assign textfield.text to…
-4
votes
1 answer

Swift code that will print a string of all the characters of a new word typed in a UITextView as they are being typed

I need help with swift code or function that will run in the body of UITextView function textViewDidChange that will print a string of all the letters of a new Word as they are being typed in a UITextView control. So if I have a UITextView…
-5
votes
2 answers

how to call this function in swift?

I have this function but the problem is I don't know how to call this function on super.viewDidLoad func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool { if let…
Indra Sen
  • 111
  • 1
  • 9
-5
votes
3 answers

Swift : Move from one textfield to another

There is a scenario when user enters two character in textfield then focus should move to next textfield. Below is code that I have used : func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString…
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
1 2 3
38
39