Working with navigation controller and navigation bar
In iOS, we have multiple native view controllers that manage list of other view controllers, such as UINavigationController
, UITabBarViewController
, or UIPageViewController
. Navigation controller is one of the most common controllers used to manage list of view controllers, and all iOS developers or users are familiar with this component. This component is one of the essential components that every iOS developer should know how to master and use.
Getting ready
In this recipe, we will see how to build an iOS app which uses a navigation controller. We will see how to push and pop between the view controllers of the navigation controller. We will discuss the navigation bar, which you can see at the top of the navigation controller, and how to customize it.
There is some information that you should know about UINavigationController
:
The view controllers that it manages are put in a stack; when you push a view controller, you put it at the top...