So I just made my ViewController conform to UITextFieldDelegate
.
They way I understand it is:
A Delegate
is simply a protocol. Protocols have some requirements, in the case of UITextFieldDelegate
some of them would look like..
protocol UITextFieldDelegate: class {
var delegate: (Not sure of this type actually) { get set }
func textFieldDidEndEditing(_ textField: UITextField)
func textFieldDidBeginEditing(_ textField: UITextField)
//etc, etc.
}
Why did I get no compile errors when I hadn't implemented any of the methods? Are they some how not required or does UIViewController implicitly already conform to these methods?