Chapter 12. Application navigation
This chapter covers
- Components that facilitate navigation
- Assembling data to drive navigation components
- Interacting with navigation components
We’ve explored application flow and structure through custom and native application events. Events provide a clear way of communicating between different parts of the application. An important aspect of application development is the ability to move from one functional area of the application to another. We borrow from a real-world metaphor and refer to this activity as navigation. Just as with navigation in the real world, it’s important to maintain familiarity with navigation components. In this chapter, we’ll look at the following components that you’ll use to add navigational features to your application:
- Menu
- MenuBar
- ViewStack
- ButtonBar
- TabNavigator
- Accordion
Before we can delve into how to use each of these components, we need to prepare the data they’ll use. Like so many tasks, this can be done many ways; we’ll explore the options along with their pros and cons.
Drop-down menus have been a part of basic navigation since the innovation of the GUI; they add an easy way to display an application’s features and selection lists without taking up a lot of your window’s valuable real estate—they remain conveniently hidden until you need them. Drop-downs also reduce user fatigue and effort because the menu appears at the location where the user clicks a button, tab, or heading.