objective-c - 关于ios状态栏颜色变化
过去多啦不再A梦
过去多啦不再A梦 2017-04-28 09:04:40
0
2
497
  • (void)viewWillAppear:(BOOL)animated {

    [super viewWillAppear:animated];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

    }

  • (void)viewWillDisappear:(BOOL)animated {

    [super viewWillDisappear:animated];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];

    }

首先我知道这样是进入改成白色,切换到其他页面变成黑色
问题来了:tabbar上2个页面都这么写.2个页面同时这样写的话.切换过去的时候就是黑色不会变成白色。
(ps:一个是首页,一个是个人中心)

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
过去多啦不再A梦
  • First of all: format your question so that others can see it and they will be willing to answer your question.

  • Secondly: Please tell me clearly, what UITabBar 还是 UITabBarController are you using?

大家讲道理

There are two uiviewcontrollers in UITabBarController that are written like this...Homepage and Personal Center. But problems will occur when the homepage and Personal Center are switched...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!