- iOS Programming Cookbook
- Hossam Ghareeb
- 241字
- 2021-07-09 18:29:48
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 of the stack. Also, when you pop a view controller, you remove the top one from the stack and display the preceding one.
- UINavigationController has three main items--the left item, middle item, and right item.
- Left Item: By default, you will see a back button (except for the root), and its title is set to the title property of the preceding view controller. You can add a custom button in the by setting leftBarButtonItem or leftBarButtonItems properties in the navigation item of the displayed view controller.
- Middle Item: By default, a label with the current view controller title property is displayed. You can add custom middle view by setting the titleView property in the navigation item of the displayed view controller.
- Right Item: This is the same as left item; but by default, there is nothing to display. You can use the rightBarButtonItem or rightBarButtonItems properties in the navigation item.
推薦閱讀
- 嵌入式Linux開發技術
- Modern Web Testing with TestCafe
- Linux系統文件安全實戰全攻略
- Windows Server 2012 Hyper-V:Deploying the Hyper-V Enterprise Server Virtualization Platform
- Linux實戰
- BPEL and Java Cookbook
- Kubernetes網絡權威指南:基礎、原理與實踐
- 嵌入式實時操作系統μC/OS原理與實踐
- 一學就會:Windows Vista應用完全自學手冊
- Windows 7應用入門與技巧
- Hands-On UX Design for Developers
- 計算機應用基礎(Windows 7+Office 2016)
- 完美應用Ubuntu(第2版)
- 應急指揮信息系統設計
- Linux集群之美