Questions tagged [ios-statusbar]

21 questions
203
votes
33 answers

How to set Status Bar Style in Swift 3

I'm using Xcode 8.0 beta 4. In previous version, UIViewController have method to set the status bar style public func preferredStatusBarStyle() -> UIStatusBarStyle However, I found it changed to a "Get ONLY varaiable" in Swift 3. public var…
Willjay
  • 6,381
  • 4
  • 33
  • 58
94
votes
25 answers

How to change the status bar background color and text color on iOS 7?

My current application runs on iOS 5 and 6. The navigation bar is having an orange color and the status bar is having a black background color with white text color. However, when I run the same application on iOS 7, I observe the status bar looks…
Rejeesh Rajan
  • 1,019
  • 1
  • 9
  • 9
25
votes
7 answers

iOS status bar overlapping contents

I have built phonegap application, it works fine on android and windows. But for iOS I am facing issue as, status bar contents and page contents are mixed up therefore i unable to tap on the back button provided in header. Can any body help me…
RAKESH DADHICH
  • 326
  • 1
  • 4
  • 11
10
votes
4 answers

Status bar overlays webview on iOS with Capacitor

I would like to achieve the same behavior of statusbar as in the capacitor example, i.e. automatically add the correct padding so my app content doesn't display inside the status bar. However, I don't use the ionic framework but angular and the…
SimonC
  • 365
  • 3
  • 11
2
votes
4 answers

How can I change my status bar text color. Screenshot attached

I want to change status bar text color to customer color like screenshot attached. I have used this to make it light content - [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; But text color not changing. Can…
Dilip Lilaramani
  • 1,126
  • 13
  • 28
1
vote
1 answer

Is it possible to get mobile data string ie, 4G, E, 3G, 5G etc. from status bar (NSStatusBar, UIStatusBar) in xamarin / Objective C / swift

I want to know if it is possible to determine the current mobile data connection in the status bar. I know it is possible to read things such as cellular strength, wifi strength, phone battery, time etc. You can get the current celluar strength in…
Samuel James
  • 149
  • 2
  • 9
1
vote
0 answers

How to change iOS status bar color per view without SceneDelegate using SwiftUI

I have seen answers that solve the problem in the past using SceneDelegate which has now been removed with Swift's new lifecycle. Is there an updated solution to this problem? Related oudated question: SwiftUI: Status bar color Changing iOS status…
user7842007
1
vote
1 answer

StatusBar Style updates with some delay

I have 2 StoryBoard in my project and all ViewController in my 1st storyBoard are of .lightContent statusBarStyle and all ViewController in my 2nd storyBoard are of .default statusBarStyle. For that i have done below steps. 1.View controller-based…
Kuldeep
  • 4,466
  • 8
  • 32
  • 59
1
vote
2 answers

Xamarin Forms - Change Statusbar Color crossplatform

I have a xamarin forms application and I have been able to change the navigationbar color. How can I change the statusbar color crossplatform? In the image below you can see the green navigationpagebar background color. Above that it's blue, I want…
0
votes
1 answer

Why does my status bar disappear after a couple of seconds Xcode?

When I run my app on simulator or device, my status bar (time, battery, service) is visible for about 2 seconds during the launch screen and then disappears and doesn't come back. I have tried many variations within the info.plist file, changing…
PW1990
  • 393
  • 1
  • 8
0
votes
1 answer

Prevent View Controller from extending under status bar

I have a view controller which is the rootVc for Navigation Controller. I needed the navigation bar to be hiddden for the rootview controller hence I used the following method to hide it and make it reappear. override func viewWillAppear(_…
0
votes
1 answer

Safe area constrained views get magnified with status bar toggled hidden/unhidden when navigating between UIViewControllers in iOS

Like the title says, there is an unexpected behavior that safe area constrained views get magnified on iOS when you try to navigate between UIViewControllers while toggling status bar hidden/unhidden. A reproducible project can be found here. I…
inexcii
  • 1,591
  • 2
  • 15
  • 28
0
votes
1 answer

Incorrect preferredStatusBarStyle when controller animated transitioning is canceled

I have a UITabViewController which embeds some UIViewControllers. These controllers could have a different preferredStatusBarStyle. I use a UIViewControllerAnimatedTransitioning+UIPercentDrivenInteractiveTransition to switch between controllers…
0
votes
3 answers

What should be the best way to change StatusBar background colour and preferredStatusBarStyle?

My requirements are like, in my app there are two flows, so for both flows value of preferredStatusBarStyle & StatusBar background colour are different. So if I have 40 viewControllers, 20 VCs have same values and 20VCs have different values than…
Vipul Kumar
  • 893
  • 9
  • 19
0
votes
1 answer

React-Native iOS Status Bar

I am using react-native to build a simple app. I am running into an error when trying to change the background color and content color in the Status bar. I currently am testing on my iPhone 8. Does any know how to make these changes to status bar? I…
1
2