zoukankan      html  css  js  c++  java
  • 导航控制器

    /**

     精通iOS6&iOS7适配

      iOS7 

        导航栏的frame (0, 20, 320, 44)

        view的frame (0, 0, 320, 480)

     iOS6

        导航栏的frame (0, 20, 320, 44)

        view的frame (0, 0, 320, 416) 原点从导航栏下方开始计算

     iOS6无法穿透导航栏

     */

    1、设置导航控制器的内容

        // 如果使用导航控制器,以下两行代码等效!

    //    self.navigationItem.title = @"第一个";

    //    self.title = @“第一个吗";

    2、// 下一级视图控制器的返回按钮中的文字由上一级视图控制器来设置

        // 如果target&action为空,使用默认返回方法

        // 返回按钮没有必要指定target&action参数

        self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@“返回" style:UIBarButtonItemStyleBordered target:nil action:nil];

    3、// 左边按钮

        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:nil action:nil];

        // 右边按钮

        self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:nil action:nil];

    4、// 左边按钮,如果是被推出的视图控制器,一旦设置了左侧按钮

        // 那么返回按钮会失效,同时手势拖拽的操作也会失效

  • 相关阅读:
    与众不同 windows phone (39)
    与众不同 windows phone (38)
    与众不同 windows phone (37)
    与众不同 windows phone (36)
    与众不同 windows phone (35)
    与众不同 windows phone (34)
    重新想象 Windows 8 Store Apps 系列文章索引
    重新想象 Windows 8 Store Apps (71)
    重新想象 Windows 8 Store Apps (70)
    重新想象 Windows 8 Store Apps (69)
  • 原文地址:https://www.cnblogs.com/bluceZ/p/4629380.html
Copyright © 2011-2022 走看看