Monday 16 October 2017

Call the event continuously on editing of Textfield



 override func viewDidLoad() {

        super.viewDidLoad()

textField.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged)
}


func textFieldDidChange(_ textField: UITextField) {
 print("event triggered")
}

No comments:

Post a Comment

Remove bottom line in navigation bar

navigationController ?. navigationBar . setBackgroundImage ( UIImage (), for: . any , barMetrics: . default )          navigat...