首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

UINavigationController小结

2012-09-24 
UINavigationController总结UINavigationController提供了一个框架,用来管理所有的viewController;一般作

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位于屏幕的下方;

?

热点排行