Creating a Custom Navigation Bar - sammanthp007/Linux-Kernel-Development GitHub Wiki
Often times, we want to create our own Navigation Bars in order to get the right look for our app.
Step 1: Add and Setup NavigationController
Step 2: Add Nav Bar Image and Button in Storyboard
- With the NavigationController selected, go to the properties pane and uncheck, "Show navigation bar".
- Drag an ImageView containing your custom navigation bar image to the top of each ViewController.
- Add a button on top of the "Back" part of the navigation bar image and delete the button text.
Step 3: Configure Back Button
- Create a new ViewController Swift file. Creating Custom View Controllers
- Add an action from your back button. Configure a Button
- Add code to go back to the previous ViewController.
navigationController!.popViewControllerAnimated(true)
Using Navigation Controllers