Moving status bar in iOS 7

The gist of it is to use this method introduced in iOS 7: https://developer.apple.com/documentation/uikit/uiscreen/1617814-snapshotview: With that you get a UIView containing a screenshot that includes the status bar. Once you have that, it’s just a matter of hiding your current view then pushing the screenshot view around. I posted a proof of concept here: https://github.com/simonholroyd/StatusBarTest … Read more

IOS7 Status bar hide/show on select controllers

The plist setting “View controller-based status bar appearance” only controls if a per-controller based setting should be applied on iOS 7. If you set this plist option to NO, you have to manually enable and disable the status bar like (as it was until iOS 6): [[UIApplication sharedApplication] setStatusBarHidden:YES] If you set this plist option … Read more

How to display text in the browser status bar?

This can be done. Google Search is doing it, which can be seen when you hover over a Google link, the status bar shows the underlying site: Yet when you click it, it brings you to a location and user-agent dependent url that looks like https://www.google.com.sg/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CC8QFjAAahUKEwi4lP-Z4_rIAhVLk5QKHXRLAe8&url=https%3A%2F%2Fwww.example.com%2F&usg=AFQjCNFEbIRqDC65KFpmuak0aXKmnzjKVQ&bvm=bv.106923889,d.dGo. The url does Google tracking and whatnot before redirecting … Read more

In Call Status Bar (Unable to Satisfy Constraints)

iOS 9.2.1, Xcode 7.2.1, ARC enabled UPDATE 3/25/2016: Conflict still exists in Xcode 7.3, iOS 9.3. Summary: In the window hierarchy for your application there are various windows that get added onto the application window. In my case, this was the UITextEffectsWindow and the UIRemoteKeyboardWindow. These windows come with preconfigured constraints. It seems there is … Read more

How to hide status bar in UIImagepickercontroller?

This worked fine for me: – (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [[UIApplication sharedApplication] setStatusBarHidden:YES]; } Edit: As of today i just found out that in your info.plist, if you just copy-paste view controller-based status bar appearance there it won’t work … you have to hit enter on a property, and scroll to the last … Read more

Resize for in-call status bar?

iOS will invoke your viewController’s viewWillLayoutSubviews method whenever there is a change in status bar. You can override that and adjust your subviews according to the new bounds. – (void)viewWillLayoutSubviews { // Your adjustments accd to // viewController.bounds [super viewWillLayoutSubviews]; }

Change Status Bar Background Color in Swift 3

extension UIApplication { var statusBarView: UIView? { if responds(to: Selector((“statusBar”))) { return value(forKey: “statusBar”) as? UIView } return nil } } UIApplication.shared.statusBarView?.backgroundColor = .red Update for iOS 13 App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there’s no longer a status bar or status bar window. Use the statusBarManager object … Read more

Changing the Status Bar Color for specific ViewControllers using Swift in iOS8

After reading all the suggestions, and trying out a few things, I could get this to work for specific viewcontrollers using the following steps : First Step: Open your info.plist and insert a new key named “View controller-based status bar appearance” to NO Second Step (Just an explanation, no need to implement this): Normally we … Read more