Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 314 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change Status Bar text color in iOS

#31
Alternatively, you can opt out of the view-controller based status bar appearance:

1. Set `View controller-based status bar appearance` to `NO` in your `Info.plist`.
2. Call `[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];`

Note: This method has been deprecated in iOS9. Use `preferredStatusBarStyle` on the UIViewController instead. (see [Apple Developer Library][1])


[1]:

[To see links please register here]

Reply

#32
In Info.plist set 'View controller-based status bar appearance' as NO

In AppDelegate add

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
Reply

#33
If your application needs to have `UIStatusBarStyleLightContent` by default, but you still want to have the ability to use `UIStatusBarStyleDefault` on some screens, you could choose to manage the status bar color on the controller level, but in this case you'll have to overwrite `preferredStatusBarStyle` in every view controller (or implement it in a base view controller, from which all your other view controllers will inherit). Here's another way of solving this problem:

- Set the `UIViewControllerBasedStatusBarAppearance` to `NO` in the plist
- Set the `UIStatusBarStyle` to `UIStatusBarStyleLightContent`

All view controllers will use white text for the status bar. Now add this methods only in the view controllers that need the status bar with black text:

-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
}

-(void)viewWillDisappear:(BOOL)animated
{
[super viewWillAppear:animated];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
}


Reply

#34
For me, nothing happened with using all the things in the other answers (and from other sources/documentation). What did help was to set the Navigation Bar Style to "Black" in the XIB. This changed the text to white without any code at all.

![Enter image description here][2]

[2]:

Reply

#35
If you want the same result with Swift, you can use this code in your AppDelegate.swift file :

UINavigationBar.appearance().barStyle = .BlackTranslucent

And the text of your status bar will be white :-) !
Reply

#36
If you still want to use `View controller-based status bar appearance` in info.plist set to YES, meaning that you can change the statusbar for each view-controller, use the following for white text in the status-bar in ViewDidLoad:

[[[self navigationController] navigationBar] setBarStyle:UIBarStyleBlackTranslucent];
Reply

#37
**You dont need to do any code for this**

You need to add "View controller-based status bar appearance" key in info.plist as follows: [![enter image description here][1]][1]


& set its value type to Boolean & value to NO.
Then click on project settings,then click on General Tab & under Deployment Info set the preferred status bar style to .Light as follows:

[![enter image description here][2]][2]


[1]:

[2]:

Thats it.
Reply

#38
Just Change in **1)** `Info.plist` View controller-based status bar `appearance` -> `NO`
and write
**2)**

[[UIApplication
sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];
in


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

Reply

#39
The easiest way to do this from Xcode (without any coding) is:

- Add `View controller-based status bar appearance` to your Info.plist and set the value to `NO`.
- Now, go to your project target and inside `Deployment Info` you'll find an option for `Status Bar Style`. Set the value of this option to `Light`.

You'll have the `White` status bar.
Reply

#40
1. Go to `Project` -> `Target`,

2. Then set `Status Bar Style` to `Light`. It makes status-bar white from the launch screen.
[![Project Setting][1]][1]

3. Then set `View controller-based status bar appearance` equal to `NO` in `Info.plist`.

[1]:
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through