uistatusbar

Hide status bar in Launch Screen

百般思念 提交于 2020-06-11 08:16:29
问题 By default the launch screen provides a status bar. Is it possible to hide the status bar in launch screen like a Twitter app ( iOS ). 回答1: To Hide Status Bar initially on launch screen, set Hide status bar check mark on ✓ OR In Your Info.plist add: Status bar is initially hidden YES . The above both option having same impact. Additionally To Hide Status Bar on specific ViewController override prefersStatusBarHidden with true override var prefersStatusBarHidden: Bool{ return true } 来源: https:

UISearchBar overlaps status bar in iOS

蓝咒 提交于 2020-01-29 00:09:29
问题 I (just like everyone else here) am running into the same Status Bar overlap issue that everyone else is, with a little twist, and that is why I opening a new question about this. There seems to be some mechanism that lets the UISearchBar know where to position it self, which is totally out of whack. jaredsinclair answer here (iOS 7 status bar back to iOS 6 default style in iPhone app?) , explains in great detail how the Apple Engineers allow us to introduce logic to our application in order

UIStatusBarStyle changes after displaying a UIWindow over UIStatusBar

跟風遠走 提交于 2020-01-12 06:35:07
问题 I am displaying a UIWindow over the UIStatusBar , by default the UIStatusBarStyle is set to UIStatusBarStyleLightContent , but when I display the UIWindow the UIStatusBarStyle switches to the black style. 回答1: I came across this topic while struggling with the same problem. What you have to do is create a new view controller and set it as the root view controller of your UIWindow (that is the UIWindow that you are displaying over your other view). Then, in this new view controller implement

How to programmatically hide and show status bar in iOS 13?

做~自己de王妃 提交于 2020-01-11 13:23:30
问题 I have made following common method for hiding and showing again status bar. It works fine before iOS 13, but I am getting following crash while I run it for device having iOS 13 or greater. +(void)showStatusBar:(BOOL)show { UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"]; if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) { [[UIApplication sharedApplication] setStatusBarHidden:!show withAnimation

Red pulsing status bar on the iPhone

时光毁灭记忆、已成空白 提交于 2020-01-06 15:20:56
问题 I was wondering what I would need to be able to use the red pulsing status bar with the app name, when the application goes to background-mode. I've seen several apps using this functionality, but I can't really find any information about it. 回答1: If you have an active AudioQueue recording session, you will get the red status bar automatically. 来源: https://stackoverflow.com/questions/4605675/red-pulsing-status-bar-on-the-iphone

preferredStatusBarUpdateAnimation being ignored

不想你离开。 提交于 2020-01-03 09:39:41
问题 I have AuthViewController that is presenting MainViewController like so: let mainVC = MainViewContoller() mainVC.modalTransitionStyle = .CrossDissolve authVC.presentViewController(mainVC, animated: true, completion: nil) I want the AuthViewController to hide the status bar, but the MainViewController to show, like so: AuthViewController { override func preferredStatusBarStyle() -> UIStatusBarStyle { return .LightContent } override func preferredStatusBarUpdateAnimation() ->

preferredStatusBarUpdateAnimation being ignored

岁酱吖の 提交于 2020-01-03 09:39:11
问题 I have AuthViewController that is presenting MainViewController like so: let mainVC = MainViewContoller() mainVC.modalTransitionStyle = .CrossDissolve authVC.presentViewController(mainVC, animated: true, completion: nil) I want the AuthViewController to hide the status bar, but the MainViewController to show, like so: AuthViewController { override func preferredStatusBarStyle() -> UIStatusBarStyle { return .LightContent } override func preferredStatusBarUpdateAnimation() ->

iOS6 hidden status bar

别来无恙 提交于 2020-01-03 05:11:14
问题 In XCode 5 if I check Status Bar : Hide during application launch in project target settings. In iOS7 the application works as expected, after launch the app has status bar visible However in iOS6 is the status bar hidden after app launch Any suggestion how to make Status bar hidden during application launch, working on iOS6 and iOS7 ? 回答1: For iOS6 and below, we used to write a line of code in didFinishLaunchingWithOptions: as [UIApplication sharedApplication].statusBarHidden = YES; However

iOS7 - Status bar with specific color

旧巷老猫 提交于 2019-12-30 05:18:28
问题 is it possible to change status bar text and battery icon to specific color, for example red color? I have read some article about this, suggesting me to use setStatusBarStyle. But I don't have option to set to specific color. So, is it possible to do this? Thanks in advance EDIT : I was trying to find the answer at apple dev forum, but unfortunately I can't find it. The available color for UIStatusBar in iOS7 is black and white. Maybe you can try Sulthan's post below, but seems not easy, at

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

☆樱花仙子☆ 提交于 2019-12-28 15:15:49
问题 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 :