This section of the book discuss 2 techniques for dismissing the Keyboard when entering text.
The 1st. technique involves clicking the "Return" key on the keyboard to make it go away, and the 2nd. technique - about which I have a question - involves clicking anywhere on the screen outside of the text-field to make the keyboard go away.
Well in step#6 at the very top of pg. 163 we are instructed to add an IBOutlet as follows:
Code:
@interface KeyboardInputsViewController : UIViewController {
IBOutlet UITextField *textField;
}
and then to connect this textField Outlet to the File's Owner in Interface Builder.
My question is: why did we not have to go through this and create an Outlet for textField (not to mention make it a @property and then also @synthesize it) in the 1st. technique?
Why do we have to do it now? What's the difference?