Reputation: 93
I'm doing my first iOS project. I need to change my status bar color from default black to white. I know how to add a file in my info.plist
,
View Controller-based Status bar appearance
to No
.
But still I am not getting my white color. Did I forgot any code to add? Kindly, give me some assistance.
Upvotes: 0
Views: 106
Reputation: 145
Go to your general tab.under in deployment tab
select your status bar style to light
.
Upvotes: 2
Reputation: 1468
Just add the below function to the initial viewcontroller
- (UIStatusBarStyle) preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
Upvotes: 1
Reputation: 588
Before you post some question please check many question are there like your problems.
This is quit simple.You need to add below line to your "AppDelegate.m"
[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];
Thats it !!Hope this helpful
Upvotes: 2