Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Plists and Modal Views: Refining your... > The View Controller defines the beha...

The View Controller defines the behavior for the view

From the user’s perspective, we’ll have three views: the table view, the detailed view, and the new drink view. But, since we’re reusing the .xib to create the “new” view, all we need is a new view controller class that supports adding a drink. That means there isn’t any Interface Builder work to do at all!

image with no caption

Separating the UI from behavior helps you reuse your view.

Brain Power

Reusing both the .xib file and the detail view controller is also an option. But where could we run into problems with that approach?


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint