zoukankan      html  css  js  c++  java
  • windows,navigationcontroller,stausbar, 20,充满,

    window>navigationcontroller>controller,

    status bar 在window 外面么,

    1,appdelagate,

    CGRect windowFrame =self.window.frame;
        windowFrame.origin.y =20;
        windowFrame.size.height = windowFrame.size.height -20;
        self.window.frame = windowFrame;

    2,@implementation TTBaseViewController
    //-(void)viewDidLoad
    //{
    //    [super viewDidLoad];
    //    if([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0)
    //    {
    //        CGRect screen =[[UIScreen mainScreen] bounds];
    //        
    //        if(self.navigationController)
    //        {
    //            CGRect frame =self.navigationController.view.frame;
    //            frame.origin.y =20;
    //            frame.size.height = screen.size.height -20;
    //            self.navigationController.view.frame = frame;
    //        }
    //        
    //        else
    //        {
    //            if([self respondsToSelector:@selector(containerView)])
    //            {
    //                UIView*containerView =(UIView*)[self performSelector:@selector(containerView)];CGRect frame = containerView.frame;
    //                frame.origin.y =20;
    //                frame.size.height = screen.size.height -20;
    //                containerView.frame = frame;}else{CGRect frame =self.view.frame;
    //                    frame.origin.y =20;
    //                    frame.size.height = screen.size.height -20;self.view.frame = frame;
    //                }
    //        }
    //    }
    //
    //}

    viewdidload,

    viewwillappear,

      self.squareViewController = [[SquareViewController alloc] init];
        [self.squareViewController viewDidLoad];
        self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.squareViewController];
        self.navigationController.navigationBarHidden = YES;
    //    [self adaptFrame];
        self.window.rootViewController = self.navigationController;

        [self.window makeKeyAndVisible];

    执行顺序,makeKeyAndVisible 时候 才会 调用 viewwillappear,

    情况:

    1,登陆,没有登陆

    2,window,到广场,其它页面到广场,

  • 相关阅读:
    24-移动端app数据爬取
    24-移动端app数据爬取
    18闭包
    mysql日期 获取本月第一天 获取下个月的第一天
    介绍shell的来龙去脉给你看
    RHEL 和centos 的区别
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream
    CDH管理界面查看各框架的版本(hive为例)
    Cloudera hadoop配置文件地址和修改配置属性方法
    idea快速创建级联目录
  • 原文地址:https://www.cnblogs.com/guligei/p/3361051.html
Copyright © 2011-2022 走看看