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

     

  • 相关阅读:
    C#动态显示时间
    死锁问题
    TCP_NODELAY算法使用事项
    二叉搜索树的后序遍历
    从上到下打印二叉树
    栈的压入、弹出序列
    包含min函数的栈
    顺时针打印矩阵
    树的子结构
    合并两个排序链表
  • 原文地址:https://www.cnblogs.com/1oo1/p/3975467.html
Copyright © 2011-2022 走看看