Chapter 4 - Split View-Based App
When I double-click the DetailView.xib (Step 1, p. 120) and look at the DetailView.xib window, it lists the toolbar underneath the View. I assume I need to delete this class and add the navigationBar class, correct?
[update]
I am not sure if 3.2 changed during the writing of the book. I suspect it did which is why I did not get the expected results at the outset.
There are several issues with this tutorial. It builds correctly from the downloaded file, but did not build correctly following the steps outlined in the book. You can get it to build correctly following the steps in the book with some modifications.
The first issue dealt with the DetailView.xib. I could not get this to build correctly in the simulator after three attempts. I had noticed that the toolbar was included in the initial DetailView window, not the Navigation Bar during the second attempt. I found the NavigationBar in the Classes screen and thought by adding it to the view that would take care of the issue. For some reason, I could not get it to build as it did in the downloaded version. I'm still uncertain what I did wrong in trying to resolve this issue. I ended up opening the xib in the downloaded version, and saving it as the same xib in the folder that contained my build. I need to go back and check Apple's documentation. I am interested in understanding why the toolbar is automatically added when a split-view is created and the navigation bar is not...as well as...how the toolbar differs from the navigation bar.
The other issues dealt with snippets of code that were grey (not in bold) which needed to be included in the code. Most notably, anything dealing with the Navigation Bar. I also commented out anything dealing with the toolbar.
There are also some additional snippets of code missing in the RootViewController.m and DetailViewController.m files. Carefully comparing the code from the downloaded files with the files I was building identified which snippets were missing.
Once I took care of the xib and compared the code, the app built correctly in both the simulator and on the iPad.
Split-views are essential to some of the apps I am beginning to work on so tearing this apart to try and understand what was happening helped my learning style. Just wanted to add these comments in case someone else was hitting the same issues.
Last edited by johnoeffinger; May 13th, 2010 at 04:11 PM..
|