Home > Articles > Home & Office Computing > Entertainment/Gaming/Gadgets

This chapter is from the book

Summary

This chapter showed many view controller classes in action. You learned how to use them to handle view presentation and user navigation for various device deployment choices. With these classes, you discovered how to expand virtual interaction space and create multipage interfaces as demanded by applications, while respecting the human interface guidelines on the platform in question. Before moving on to the next chapter, here are a few points to consider about view controllers:

  • Use navigation trees to build hierarchical interfaces. They work well for looking at file structures or building a settings tree. When you think “disclosure view” or “preferences,” consider pushing a new controller onto a navigation stack or using a split view to present them directly.
  • Don’t be afraid to use conventional UI elements in unconventional ways so long as you respect the overall Apple human interface guidelines. Parts of this chapter covered innovative uses for the UINavigationController that didn’t involve any navigation. The tools are there for the using.
  • Be persistent. Let your users return to the same GUI state that they last left from. NSUserDefaults provides a built-in system for storing information between application runs. Use these defaults to re-create the prior interface state.
  • Go Universal. Let your code adapt itself for various device deployments rather than forcing your app into an only-iPhone or only-iPad design. This chapter touched on some simple runtime device detection and interface updates that you can easily expand for more challenging circumstances. Universal deployment isn't just about stretching views and using alternate art and xib files. It's also about detecting when a device influences the way you interact, not just the look of the interface.
  • When working with custom containers, don't be afraid of using storyboards directly. You do not have to build and retain an array of all your controllers at once. Storyboards offer direct access to all your elements, letting you move past the controller-setting you use in tab bars and mimicked in Recipe 5-11. Like the new page view controller class, just load the controllers you need, when you need them.
  • Interface Builder's new storyboards provide a welcome new way to set up navigation controllers, tab bars, and more. They are a great innovation on Apple's part and are sure to simplify many design tasks for you.
  • + Share This
  • 🔖 Save To Your Account