zoukankan      html  css  js  c++  java
  • Chapter 6 ViewController

     

    1. A  view controller’s view is not created until it needs to appear on the screen  . This optimization is called lazy loading, and it can conserve memory and improve performance.

     

    ~ programmatically, by overriding the UIViewController method loadView.

    ~ in Interface Builder, by loading a NIB file.)

     

     

     2. When  a view controller is created, its view property is nil, If a view controller is asked for its view and its view is nil, then  the view controller is sent the loadView message.

     

    3. Setting a view controller as  the rootViewController adds that view controller’s view as a subview of the window (UIWindow’s setRootViewController:), It also automatically resizes the view to be the same size as the window.

     

     

    4. When a view controller gets its view hierarchy by loading a NIB file, you do not override loadView.

     

    5. UITabBarController allows user to swap between view controllers.

     

    6. A local notification is a way for an application to alert the user even when the application is not currently running.

     

    ~ NSDate *date = [NSDate  date];

      UILocalNotification *note = [[UILocalNotification alloc] init];

      note.alertBody = @“Local notification”;

      note.fireDate = date;

      [[UIApplication shareApplication] scheduleLocalNotification:note];

     

  • 相关阅读:
    HashTable, HashMap,TreeMap区别
    redis的多线程
    五种I/O模型介绍
    SpringBoot的优点
    spring注解
    三种方法求解两个数组的交集
    数据库七种传播行为
    BETA 版冲刺前准备
    Python学习笔记(二)--变量和数据类型
    事后诸葛亮
  • 原文地址:https://www.cnblogs.com/1oo1/p/3975467.html
Copyright © 2011-2022 走看看