2131
2131

Reputation: 93

Need to change my status bar color to white

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

Answers (3)

jj1
jj1

Reputation: 145

Go to your general tab.under in deployment tab select your status bar style to light.

Upvotes: 2

DHEERAJ
DHEERAJ

Reputation: 1468

Just add the below function to the initial viewcontroller

- (UIStatusBarStyle) preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

Upvotes: 1

Spike
Spike

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

Related Questions