读书人

UINavigationController小结

发布时间: 2012-09-24 13:49:41 作者: rapoo

UINavigationController总结

UINavigationController提供了一个框架,用来管理所有的viewController;一般作为rootController使用,然后应用中的所有viewController都作为navigationController里面的controller,navigationController有一个stack,里面放着所有的viewController,对stack的操作方法:

navigationController.pushController:animated://添加controller

navigationController.popController:animated://去掉controller


UINavigationBar ?每一个UINavigationController都对应有一个UINavigationBar,可以通过该对象自定义bar的外观;

UINavigationItem UINavigationController栈里的每个viewController都对应有一个UINavigationItem,可以通过这个对象自定义bar上的按钮个数,具体可以定义leftBarButtonItem或者leftBarButtonItems,rightBarButtonItem或者rightBarButtonItems;

?

ToolBar 就像UINavigationBar一样,每个UINavigationController都对应有一个toolBar位于屏幕的下方;

?

读书人网 >移动开发

热点推荐