zoukankan      html  css  js  c++  java
  • Chapter 10 UINavigationController

     Chapter 10 UINavigationController

    1. When your application presents multiple screens of information, a UINavigationController maintains a stack of those screens. Each screen is the view of a UIViewController, and the stack is an array of view controllers. When a UIViewController is on top of the stack, its view is visible.

     

    2. The viewControllers array of a navigation controller is dynamic - you start with a root view controller and push view controllers depending on user input, when the stack is popped, the controller is destroyed.  pushViewController:animated:

     

    3. When the message endEditing: is sent to a view, if it or any of its subviews is currently the first responder, it will resign its first responder status, and the keyboard will be dismissed. (The argument passed determines whether the first responder should be forced into retirement. Some first responders might refuse to resign, and passing YES ignores that refusal.)

     

    4. Like UINavigationItem, UIBarButtonItem is not a subclass of UIView. Instead, UINavigationItem encapsulates information that UINavigationBar uses to configure itself. Similarly, UIBarButtonItem is not a view, but holds the information about how a single button on the UINavigationBar should be displayed. (A UIToolBar also uses instances of UIBarButtonItem to configure itself.)

     

    5. UIViewController has an editButtonItem property, and when sent editButtonItem, the view controller creates a UIBarButtonItem with the title Edit. Even better, this button comes with a target-action pair: it sends the message setEditing:animated: to its UIViewController when tapped.

     

    6. Dismiss keyboard  with UIResponder’s method:

     

    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

    {

        [self.view endEditing:YES];

    }

     

     

     

     

  • 相关阅读:
    [转] s3c6410开发板研究笔记(一)从SD卡启动UBOOT(未完待续。。。)
    [转]解决aptget f install提示错误
    ubuntu 软件中心崩溃解决办法
    [转]Linux环境下Jlink配置
    [转]SD卡引脚 电路图及工作原理介绍
    [原]linux下安装运行supervivitransfertool
    [转]OclO 开发笔记
    [转]dnw for linux
    [转]使用JLink间接烧写uboot,supervivi到mini2440的方法
    Js 浏览器全屏代码(按F11)
  • 原文地址:https://www.cnblogs.com/1oo1/p/3981948.html
Copyright © 2011-2022 走看看