Wrox Programmer Forums
|
BOOK: Beginning iOS 4 Application Development
This is the forum to discuss the Wrox book Beginning iOS 4 Application Development by Wei-Meng Lee; ISBN: 978-0-470-91802-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS 4 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 25th, 2011, 09:35 PM
Registered User
 
Join Date: May 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch. 6 - pg. 163 - Dismissing the Keyboard

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?
 
Old May 26th, 2011, 09:25 PM
Registered User
 
Join Date: May 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The admittedly rudimentary sense I get of this, having gone through it today and now just in playing around with it (assuming I understand your question) is that if you don't do this, there's no way for it to resign as First Responder.

It's still there, and it will still bring up the keyboard and accept input, put there seems to be no means of dismissing it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch. 3 pg. 75 Try It Out Trouble rexcampbell BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 August 17th, 2010 02:29 AM
Ch 5 P 163 - Using the ! operator flapjack BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 9 April 23rd, 2010 12:34 PM
CH 5 pg 160 wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 8 November 12th, 2003 11:23 PM
CH 4 Pg 143 HTMLSpecialChars wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 November 3rd, 2003 02:29 PM
CH 3 pg 76 wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 October 26th, 2003 08:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.