(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:一个是首页,一个是个人中心)
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...