What We’ve Learned

This has been a very long chapter, in which we’ve radically reworked our app into one that is far more capable and extensible than when we started. We’ve gone from being tied to one screen to having as many as we care to create.

To do this, we reworked the storyboard from a single-view design to a navigation metaphor, putting a navigation controller at the beginning of the storyboard and letting it manage the user’s progress through our root view controller and a new tweet detail view controller, giving us forward/back navigation pretty much for free. We saw how to use storyboard segues to deliver information between view controllers, which allowed our root view controller to tell the tweet detail view controller just which tweet the user tapped on. Then we tried out a modal transition to show the user detail view controller, and we saw how exit segues let us return to any previous view controller and deliver data back to them in the unwind method.

This is how many popular apps work: navigating forward and backward through view controllers, each specific to some part of the app’s overall functionality. From here, we can add any new features we might think of.

In the next chapter, we’re going to look at another way of managing multiple view controllers, one that’s particularly well suited to the iPad.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.138.94