Answers for "swift 5 on return button action"

0

swift 5 on return button action

Swift 5:
class YourClass: UIViewController, UITextFieldDelegate {
  
  	// will trigger when return button from keyboard is pressed
    func textFieldShouldReturn(_ textField: UITextField) -> Bool {
        performAction(textField)
        return true
    }
  
  	private func preformAction(_ textField:UITextField){
    	//... code here ...
    }
}
Posted by: Guest on December-06-2021

Code answers related to "swift 5 on return button action"

Code answers related to "Swift"

Browse Popular Code Answers by Language