Wrox Programmer Forums
|
BOOK: Professional iPhone and iPad Application Development
This is the forum to discuss the Wrox book Professional iPhone and iPad Application Development by Gene Backlin; ISBN: 978-0-470-87819-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional iPhone and iPad 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 March 2nd, 2011, 12:31 PM
Friend of Wrox
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default Chapter 1 Navigation Bar

Finally got time to start the book.

Two things about the code:
1. On page 5 two instance variables for odd and even arrays are declared and never used, new local arrays are created in the -initData method that serve the same purpose. Since the instance variables are never used, why have them?
2. Is there a particular reason why, in the DetailViewController, you created a -setText method instead of using the templates -setDetailItem instead? (which is what the template provides in the tableView:didSelectTableView… method)
Both versions produce the same result, so is there an advantage for one over the other?

Two text quibbles:
I think
Listing 1-5 #pragma mark Table view delegate should be Table view datasource
Doesn't affect anything, but might be confusing, if reader hasn't used tableViews often, about the difference between delegate and datasource methods, and the fact that the delegate and datasource are 2 separate things.
p. 15 Since we made no changes to the properties the line about matching them with an @synthesize seems a little out of place. Listing 1-16 Addition of @synthesize - nothing is added. The point that might be useful to bring out is the fact that the property for the UIPopoverController is not declared in the header, but in the implementation file, and the reason for doing so.

Looking forward to picking up much useful information.
Bob
 
Old March 2nd, 2011, 08:32 PM
Wrox Author
 
Join Date: Oct 2010
Posts: 61
Thanks: 0
Thanked 9 Times in 7 Posts
Default

1. I originally had an idea that used them, then as I got into the development I just used the NSDictionary and never took them out.
2. I just wanted to simplify the process and having two methods (setDetailItem, configureView) and the code to do the retain/release is not really needed if you use the property/synthesize approach. Strictly a personal approach, leaving the template code in will not cause any problems. In the NeXTSTEP days we had to do the retain/release because we had to write the accessors and modifiers ourselves as a matter of practice.

Listing 1-5. Yes just a cut and paste issue as the template had it grouped with the number of sections and number of rows and I just wanted to separate it on its own.
p. 15. Good catch, it was a text cut that should have occurred but didn't :)

I did not bring up the visibility of the UIPopoverController because it was placed by the template, but your point is a good one, thank you !


Thank you for taking the time to not only go in depth on my book, but to take the time and effort to point it out on this forum, it is greatly appreciated !

Take Care,
Gene





Similar Threads
Thread Thread Starter Forum Replies Last Post
navigation bar problem Aritra ASP.NET 1.0 and 1.1 Basics 5 March 13th, 2007 12:32 PM
navigation bar in templates amc Dreamweaver (all versions) 1 July 9th, 2004 03:48 AM
Navigation Bar help Varg_88 Classic ASP Databases 1 May 12th, 2004 07:33 AM
recordset navigation bar... joeore PHP Databases 2 March 4th, 2004 05:49 PM





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