0.0 introduction

本文来自于View controller programming guide for ios,仅供自我学习之用,如果能够帮到诸位,最好不过。

About view controller

view controller 是一个在app's data和可视化外观之间的至关重要的link。无论app什么时候显示user interface,显示的内容都是在view controller的控制管理之下的,或者在多个view controller之间协调管理之下的

在构建app中view controller提供了骨骼framework

ios 提供许多已经构建好的view controller类去支持标准的user interface,从开发app开始,你就需要custome一个或多个view controller去显示特定的内容

At a Glance

view controller 是在MVC设计模式中一个传统的 controller对象,view controller提供在ios app中所有的常见的行为,通常这些行为被构建在基本的class中,对一些行为,based class提供了解决方法中的一部分,其他的有custom 的view controller去实现

A View Controller Manages a Set of Views

a view controller管理你的app user interface中不相关的部分,根据需要,他让view去显示或者交互,view是分层的

You Manage Your Content Using Content View Controllers


Container View Controllers Manage Other View Controllers

container view controllers显示被别的view controllers所拥有的内容,这些别的view controllers与container view controller有着明确的关系,叫做parent- child relationship

container和content view controller的结合用一个单root view controller创建了一个view controller的分层结构,

每种类型的container都定义了自己的interface去管理他的child.the containers的方法有时候在他的child之间定义了特定的导航关系

Presenting a View Controller Temporarily Brings Its View Onscreen

有时候,一个view controller需要显示额外的信息给用户,或者想要用户去提供额外的信息,但由于屏幕的空间是有限的,不可能同时显示所有的user interface elements,所以ios app临时显示另外一个view去和用户交互,这个view将一直显示知道用户完成了请求的行为

ios 允许一个view controller去呈现另外一个view controller的内容

Storyboards Link User Interface Elements into an App Interface


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值