zoukankan      html  css  js  c++  java
  • ViewController之iOS5.1

     ViewController之iOS5.1

    1.You never directly assign the views to the window. Instead, you assign a view controller to the window, and the view controller automatically adds its view to the window。

    2.Every view is controlled by only one view controller.

    3.content view controllers and container view controllers

    4.In iOS 5.0 and later, custom UIViewController subclasses can also act as container view controllers. A container view controller manages the presentation of content of other view controllers it owns, also known as its child view controllers. A child’s view can be presented as-is or in conjunction with views owned by the container view controller.

    Pay Attention

    The addChildViewController: method automatically calls the willMoveToParentViewController: method of the view controller to be added as a child before adding it, but it does not call the didMoveToParentViewController: method. Your container view controller class must call the didMoveToParentViewController: of the child view controller after the transition to the new child is complete or, if there is no transition, immediately after calling the addChildViewController: method.

    Likewise, the container view controller must call the willMoveToParentViewController: method before calling the removeFromParentViewController method. The removeFromParentViewController method automatically calls the didMoveToParentViewController: method of the child view controller.

     

     

     

  • 相关阅读:
    修改input标签输入样式
    CSS3的transform 转换
    前端小知识--区分get和post请求
    JS面向对象--你真的理解闭包了吗?
    px,em,rem的区别
    傻瓜式教程--实现登录页面的验证码以及验证(VUE)
    基于RBAC权限管理的后台管理系统
    在VUE中实现打印
    关于三层架构的好文章
    RabbitMQ常用命令、管理界面
  • 原文地址:https://www.cnblogs.com/tekkaman/p/2647444.html
Copyright © 2011-2022 走看看