zoukankan      html  css  js  c++  java
  • 隐藏状态栏

    在info.plist 添加两个键

    View controller-based status bar appearance   YES

    Status bar is initially hidden  NO

    代码中在要隐藏状态栏的地方(UIViewController 中)

    @property (nonatomic, getter = isStatusBarHidden) BOOL statusBarHidden;
    #pragma mark - 隐藏状态栏
    #pragma mark - Private
    -  (BOOL)prefersStatusBarHidden {
        return  self.statusBarHidden ;
    }
    - (void)toggleStatusBarHiddenWithAppearanceUpdate:(BOOL)updateAppearance
    {
        self.statusBarHidden = updateAppearance;
        [UIView animateWithDuration:UINavigationControllerHideShowBarDuration animations:^{
                [self setNeedsStatusBarAppearanceUpdate];
            }];
        
    }

    [self  toggleStatusBarHiddenWithAppearanceUpdate:YES];

    [self  toggleStatusBarHiddenWithAppearanceUpdate:NO];

     

  • 相关阅读:
    poj3660 最短路/拓扑序
    poj1502 最短路
    poj3259 最短路判环
    poj1680 最短路判环
    一些自己常用的cdn
    bower
    vuejs点滴
    jquery的ajax
    jquery点滴
    githubpage+hexo构建自己的个人博客
  • 原文地址:https://www.cnblogs.com/DamonTang/p/4095796.html
Copyright © 2011-2022 走看看