I have my ViewController class which implements UITextFieldDelegate. I have no auto complete for the funcs such as textFieldShouldBeginEditing. Is this a bug in XCode 6?
Swift 4:
@IBOutlet weak var yourNameTextField: UITextField! {
didSet {
yourNameTextField.delegate = self
}
}
extension YourNameViewController: UITextFieldDelegate {
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
switch textField {
case yourNameTextField:
yourNameTextField.resignFirstResponder()
default:
break
}
return true
}
func textFieldShouldEndEditing(_ textField: UITextField) -> Bool {
return true
}
}