浅谈UIViewController 使用-addChildViewController自定义视图控制器
2016-03-17 23:19
621 查看
View Controllers 是APP内在架构的基础,总体来讲一个APP的View Controllers 主要由以下两种设计而成:
There are two types of view controllers:
Content view controllers manage a discrete piece of your app’s content and are the main type of view controller that you create.
Container view controllers* collect information from other view controllers (known as child view controllers) and present it in a way that facilitates navigation or presents the content of those view controllers differently.
Most apps are a mixture of both types of view controllers.
第一种Content view controllers,上下文控制器,我喜欢叫导航控制器,它维护着一个视图控制器栈,通过push或者pop进行管理。
第二种Container view controllers,容器控制器,如tabbar view controller,本身作为parent view controller,拥有一个childViewControllers属性(NSArray* & read-only)。可以在 View Controller Programming Guide for iOS 了解详情。
Container view controllers功能很强大,我们可以利用它来自定义控制器,制作出如下所示的控制器效果:
Demo下载地址 欢迎收藏。
There are two types of view controllers:
Content view controllers manage a discrete piece of your app’s content and are the main type of view controller that you create.
Container view controllers* collect information from other view controllers (known as child view controllers) and present it in a way that facilitates navigation or presents the content of those view controllers differently.
Most apps are a mixture of both types of view controllers.
第一种Content view controllers,上下文控制器,我喜欢叫导航控制器,它维护着一个视图控制器栈,通过push或者pop进行管理。
第二种Container view controllers,容器控制器,如tabbar view controller,本身作为parent view controller,拥有一个childViewControllers属性(NSArray* & read-only)。可以在 View Controller Programming Guide for iOS 了解详情。
Container view controllers功能很强大,我们可以利用它来自定义控制器,制作出如下所示的控制器效果:
Demo下载地址 欢迎收藏。
相关文章推荐
- iOS--(UITableViewCell)、(UITableViewController)微信个人主页
- iOS UITableView 微信页面
- java.sql.SQLException: Incorrect string value: 插入中文报错
- JS模块化工具requirejs教程02
- UITabBarItem UIBarButtonItem改变title颜色
- JS模块化工具requirejs教程01
- 304. Range Sum Query 2D - Immutable LeetCode
- IOS学习 UIPickerView UItextFiled 省市区 三联动输入
- iOS UITableView , UITableViewController ,UITableViewCell实现全国各省市遍历,选择相应的地区
- UI组件——TextView
- 湖大ACM-Recaman's Sequence
- UITableView的增,删,改例子
- iOS 开发基础UIControl事件
- php报错 ----> Call to undefined function imagecreatetruecolor()
- UESTC 491 Tricks in Bits
- 从客户端中检测到有潜在危险的 Request.Form 值 设置 ValidateRequest="false" 不管用
- IBM Bluemix试用到期后绑定信用卡继续免费使用
- QtQuick TableView 操作
- UESTC 483 Data Structure Problem
- 关于UIView及其子类重绘drawRect