O'Reilly logo

iPhone® Application Development For Dummies®, 4th 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

Chapter 13

Implementing the Content Controller

In This Chapter

arrow Working with custom view controllers

arrow Using the Trip model to get data for the view

With the model in place, you can now return to the Content view controller that you add in Chapter 11 and transform its view into the user interface you fell in love with in Chapter 4. In this chapter, you replace the “generic” UIViewController or UITableViewController supplied by the storyboard with a custom view controller. By doing so, you add the logic to connect the view to the model.

remember_4c.eps The way you are about to add the logic to connect the view to the model via the view controller in this chapter is the general formula you will use for the rest of the view controllers in the storyboard. Although you can add the view controllers to the storyboard graphically, as you have done, you need to add some code to have the controller actually do anything, such as get data from the model and send it to the view.

Using Custom View Controllers

The view controller provided by the storyboard is a UIViewController and is clueless about what you want to display in a view, much less the model it will need to get the data from. In this section, you create ...

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