zoukankan      html  css  js  c++  java
  • IOS7改变状态栏文字的颜色以及导航栏背景颜色

    ios7以下的版本设置导航栏背景颜色可以使用

    [[UINavigationBar appearance] setTintColor:[UIColor orangeColor]];

    ios7以后:

    [[UINavigationBar appearance] setBarTintColor:[UIColor orangeColor]];

    默认带有一定透明效果,可以使用以下方法去除系统效果

    [navigationController.navigationBar setTranslucent:NO];

    公司项目需要将状态栏的文字颜色设置为白色,以下方法即可

    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

    改变后需要及时刷新的调用

    [viewController setNeedsStatusBarAppearanceUpdate];

    如果没有效果,需要在plist文件里设置

    View controller-based status bar appearance  = NO

  • 相关阅读:
    钉钉小程序解析html的方法
    git使用
    electron-vue项目
    数组方法大全
    关于AJAX
    常用的东西
    常用正则表达式
    选项卡
    进度条
    泛型单列
  • 原文地址:https://www.cnblogs.com/xieweiwei/p/3449473.html
Copyright © 2011-2022 走看看