uistatusbar

Set the status bar to black colour

女生的网名这么多〃 提交于 2019-11-28 11:40:47
I want to set the colour of the status bar (The small strip on top where the clock and battery is displayed) to black background with white text. How can I do this ? My approach so far : I added the following in the info.plist View controller-based status bar appearance --> NO and in the viewController - (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleDefault; } However, the style does not change. How can I make the status bar black? For Xcode 8 / iOS 10 / Swift 3: Change the status bar background color temporarily on one view by adding a colored UIView under the status bar.

How we can set the Light Content style of Status Bar in iOS 9 for whole application?

馋奶兔 提交于 2019-11-28 10:02:20
I want to apply Light Content style to the whole application. Following method is deprecated in iOS 9 without the replacement method. -setStatusBarStyle:animated: Sets the style of the status bar, optionally animating the transition to the new style. Is working in the AppDelegate like as : Swift 1.2 Code : UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: true) But when I upgrade my project to iOS 9/Swift 2 they are giving me warning message about : <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG

Is there a way to hide “Back to Safari” from status bar in iOS9?

给你一囗甜甜゛ 提交于 2019-11-28 09:42:04
How to hide this < Back to Safari from status bar programmatically? I'm getting it in my app – as I'm going out from my app if a user wants to login with their Facebook account. Here's the scenario for which I don't like (want) "Back to Safari" in my app. At first launch of the app (and user not logged in). User choose Login with Facebook option. Facebook iOS SDK comes into the picture, it takes me to the Safari. I logged in and back to the app But, there's "Back to Safari"... It shouldn't be here anymore. No, there is no API that lets you do this. You can achieve this by forwarding to a

Adjusting views when Status Bar hides on rotation

故事扮演 提交于 2019-11-28 05:21:04
问题 I've browsed around looking for an answer for this, but I've only found people with similar problems and not this exact problem, so hopefully someone here can help me! I have an iPad App. On iPad, when you hold the iPad in either portrait or landscape, the status bar with the clock and battery is always shown. For this reason, I have some custom toolbars at the top of some of my View Controllers that account for those 20 points. I am now working on making my App universal. The first thing I

UIImagePickerController in iOS 7 status bar

眉间皱痕 提交于 2019-11-28 04:44:09
问题 In io7,the status bar on top a view is a nightmare.Fortunally i managed to make it work so it will be placed above the view.I did it like this: - (void)viewDidLoad { [super viewDidLoad]; if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { self.view.backgroundColor=[UIColor colorWithRed:(152/255.0) green:(204/255.0) blue:(51/255.0) alpha:1] ; CGRect frame = self.topNav.frame; frame.origin.y = 20; self.topNav.frame = frame; } .... } Now my status bar is above my navigation bar.

Status Bar showing black text, only on iPhone 6 iOS 8 simulator

南楼画角 提交于 2019-11-28 04:05:56
I'm trying to convert my iOS 7 app to iOS 8 in Xcode 6 GM, and when i run it on the iPhone 5s or lower simulators with iOS 8 everything is fine, but on the iPhone 6 and 6 Plus simulators, the Status Bar has black text instead of white like it is everywhere anytime else. I've set the Info.plist UIStatusBarStyle to "Transparent Black Style (alpha of 0.5)" thru Xcode, and that seems to have the desired effect everywhere else. Any ideas what is going on? (I haven't touched any of the storyboards yet, could it be anything with that? I was hoping I could put that off for a while:) Aaron Wasserman

Changing the Color of the Status Bar [duplicate]

泪湿孤枕 提交于 2019-11-27 21:45:52
问题 This question already has answers here : Change Status Bar Background Color in Swift 3 (12 answers) Closed 2 months ago . I am trying to change the color of the status bar to like a blue, or some other color. Is this possible, or does Apple not allow it? 回答1: NOTE: This solution fails under iOS 13 and later. First in Plist set View controller-based status bar appearance to NO func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:

Auto Layout and in-call status bar

雨燕双飞 提交于 2019-11-27 16:01:39
问题 I'd like to ask about Auto Layout and in-call status bar. Here's a simple scenario that demonstrates my problem: Create project with "Use Storyboards" enabled Add "View Controller" and enable its "Is Initial View Controller" Set background color of controller's view to red Add "Table View" into controller's view The table view should have 4 layout constraints (leading, top, trailing, bottom) to Superview with constant set to 0. Now when I run this app in Simulator and press ⌘ + T I can see

How to show an icon in the status bar when application is running, including in the background?

这一生的挚爱 提交于 2019-11-27 11:22:42
I want to put an icon in the status bar when ever my application is running, including when it is running in the background. How can I do this? Greg Giacovelli You should be able to do this with Notification and the NotificationManager. However getting a guaranteed way to know when your application is not running is the hard part. You can get the basic functionality of what you are desiring by doing something like: Notification notification = new Notification(R.drawable.your_app_icon, R.string.name_of_your_app, System.currentTimeMillis()); notification.flags |= Notification.FLAG_NO_CLEAR |

Changing the status bar text color in splash screen iOS 7

…衆ロ難τιáo~ 提交于 2019-11-27 10:46:15
I know that are already some stackoverflow questions that say how to change the status bar for all view controllers. I am currently changing the color of status bar this way: if(IS_IOS7) [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; In the application:DidFinishLaunching Additionally, I have changed the value of UIViewControllerBasedStatusBarAppearance in the plist to NO . However, in the splashscreen it stills shows the status bar text with the black color. Is it possible to change the color of the status bar text color in the splash screen ? In the