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

7. Migrating to iPad: We need more room > Don’t forget the tableview

Don’t forget the tableview

Instead of swapping out the table view when a row is selected, the detail view needs to change and the table view should stay the same—but only for the iPad, not the iPhone.

To fix that problem, we need to split the code, just like we did in our AppDelegate.

What’s the difference here between the iPad and the iPhone?

That restrained hierarchy thing. The iPhone has to show two different views for the detail view and the root view. Since the views are together for the split view controller on the iPad, the view isn’t being presented, but it still has to change.

Add this!

image with no caption
image with no caption

Test Drive

Before you build and run, go into Interface Builder and link up the detail view in the split pane to our new split ViewDetailView property on the RootViewController. Now you’re pushing the detail view onto the right-hand side of the pane, while the left-hand side is still showing the table view.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free 10-Day Trial


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