LoginSignup
15
15

More than 5 years have passed since last update.

iOS7でステータスバーとFONTの色を変更する(備忘録)

Posted at

Info.plist
`View controller-based status bar appearance という項目名でBOOLでNOを設定

AppDelegateのRootViewControllerをセットする前でiOS7だったら
UIWindow *background = [[UIWindow alloc] initWithFrame: CGRectMake(0, 0,self.window.frame.size.width, 20)];
background.backgroundColor =[UIColor blackColor];
[background setHidden:NO];

RootViewControllerのViewDidLoadで
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

という風にしてあげるとステータスバーを黒で、フォントを白で表示することができる。

15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15