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];

     

  • 相关阅读:
    XStream
    Tomcat权威指南-读书摘要系列2
    《人性的弱点》
    HttpClient
    Spring整合Mybatis
    Tomcat权威指南-读书摘要系列1
    MT【88】抽象函数
    MT【87】迭代画图
    MT【86】两个绝对值之和最大
    MT【85】正整数系数
  • 原文地址:https://www.cnblogs.com/1oo1/p/3975467.html
Copyright © 2011-2022 走看看