swift 2.0 - UITextFieldDelegate protocol extension not working
I'm trying to add a default behavior on some UITextFieldDelegate 's methods using protocol extensions like so : extension ViewController: UITextFieldDelegate { // Works if I uncommented this so I know delegates are properly set // func textFieldShouldReturn(textField: UITextField) -> Bool { // textField.resignFirstResponder() // return true // } } extension UITextFieldDelegate { func textFieldShouldReturn(textField: UITextField) -> Bool { textField.resignFirstResponder() return true } } As you may guess, the keyboard never dismiss. I can't really see where's the problem here. Is this a