美文网首页
IOS 容器总结

IOS 容器总结

作者: 小暖风 | 来源:发表于2017-08-19 14:40 被阅读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相应方法。

    相关文章

      网友评论

          本文标题:IOS 容器总结

          本文链接:https://www.haomeiwen.com/subject/ayytdxtx.html