O'Reilly logo

iPad Application Development For Dummies, 3rd Edition by Neal Goldstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting Up a Custom View Controller

While RTMasterViewController already actually does something, I want to develop it for use in RoadTrip by customizing its appearance and having it display (through its entries or cells) a table of contents showing the application functionality. Here’s how you’d start things off:

1. In the Project navigator, select MainStoryboard_iPad.

2. In the Document List, select Master View Controller – Master in the Master View Controller – Master scene, open the disclosure triangle next to the Table View controller in the scene, and select the Table view.

3. Using the Inspector selector bar, open the Attributes inspector in the Utility area.

You’ll notice that, in the Table View section of the Attributes inspector, the Static Cells option is selected in the Content drop-down menu, as shown in Figure 12-1. You changed this Table view to Static cells in Chapter 5.

As I explain in Chapter 5, static cells are a new feature in iOS 5.0 — used when you know in advance what needs to be displayed in a cell. Instead of having to implement a method in your view controller and return the cell with the text you want (as you will in Chapter 20 where you create cells based on the information for each destination in the Destinations plist) you can format the cells in the storyboard.

4. In the Document List, open the disclosure triangle next to the Table view, select Table View Section, and delete it.

You could’ve left that cell and added cells to that section and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required