简体   繁体   中英

Change Label color of status bar in ios

In iPhone we have a UIStatusBar which shows the time. Does anybody know how I can change its textcolor ?

Below is the code changing style, but can we change THE label's color?

 [[UIApplication sharedApplication]
     setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

To make it work you should insert your line of code inside AppDelegate

[[UIApplication sharedApplication]
 setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

and than also set a value for the statusbar inside info.plist like this

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM