IOS 容器总结

2017-08-19  本文已影响10人  小暖风

一:UINavigationController(进栈push方法,出栈pop方法,纵向跳转,会触发代理UINavigationControllerDelegate)

1.navifationBar 一个UINavigationController 中是唯一的。

2.toolBar  底部工具条,相当于UITableController的tabbar,一个UINavigationController中是唯一的。

3.navagationBarItem,navagationController(UIViewController 的类别UINavigationController的成员变量),一个UINavigationController中每一个页面中是相互独立的。

4.tabbarItem,tabBarController(其父类UIViewController类别UITabBarControllerItem的成员变量),一个UINavigationController中每一个页面中是相互独立的。

二:UITabBarController(横向跳转,会触发比较重要的代理UITabBarControllerDelegate)

1.viewControllers,selectedIndex  各界面以及当前选中页面,常用于代理方法中。

2.tabBar 一个UITabBarController中是唯一的。

3.tabBarItem,tabBarController(UIViewController的类别UITabBarControllerItem的成员变量),一个UITabBarController中每个页面中是相互独立的。

三:UIToolBar 继承与UIView 的一个控件,用于各种自定义Bar.

1.Items Items一般存放UIBarButtonItem,后者包括成员变量coutomView,并继承与UIBarItem.UIBarItem成员变量title,image成员方法setTitleTextAttributes:forState:

四:补充,页面不借助容器,直接跳转用present和dismiss相应方法。

上一篇下一篇

猜你喜欢

热点阅读