Resizing the View Controller’s Views A view controller owns its own view and manages the view’s contents. In the process, the view controller also manages the view’s subviews. But in most cases, the view’s frame is not set directly by the view contro…
View Controller Basics Apps running on iOS–based devices have a limited amount of screen space for displaying content and therefore must be creative in how they present information to the user. Apps that have lots of information to display must there…
About View Controllers View controllers are a vital link between an app’s data and its visual appearance. Whenever an iOS app displays a user interface, the displayed content is managed by a view controller or a group of view controllers coordinating…
Using View Controllers in Your App Whether you are working with view controllers provided by iOS, or with custom controllers you’ve created to show your app’s content, you use a similar set of techniques to actually work with the view controllers. 不管…
Using View Controllers in the Responder Chain 响应链中使用视图控制器 View controllers are descendants of the UIResponder class and are therefore capable of handling all sorts of events. When a view does not respond to a given event, it passes that event to its…
Creating Custom Content View Controllers 创建自定义内容视图控制器 Custom content view controllers are the heart of your app. You use them to present your app’s unique content. All apps need at least one custom content view controller. Complex apps divide the wor…
Responding to Display-Related Notifications 响应跟显示相关的通知 When the visibility of a view controller’s view changes, the view controller calls some built-in methods to notify subclasses of the changes. You can override these methods to override how your s…
1.View Controller 基础 1.1 View Controller 分类 ViewController分为container view controller 和content view controller两种类型. 这两种类型只是用途不同,前者作为一个容器容纳其他的view controller,后者用来显示内容,代码上面区别不大.前者包括UINavigationViewController. UITabBarViewController等,后者包括UITabViewContro…
Resource Management in View Controllers View controllers are an essential part of managing your app’s resources. View controllers allow you to break your app up into multiple parts and instantiate only the parts that are needed. But more than that, a…
  Animations Animations provide fluid visual transitions between different states of your user interface. In iOS, animations are used extensively to reposition views, change their size, remove them from view hierarchies, and hide them. You might use…