How does Apple update the Airport menu while it is open? (How to change NSMenu when it is already open)

Menu mouse tracking is done in a special run loop mode (NSEventTrackingRunLoopMode). In order to modify the menu, you need to dispatch a message so that it will be processed in the event tracking mode. The easiest way to do this is to use this method of NSRunLoop: [[NSRunLoop currentRunLoop] performSelector:@selector(updateTheMenu:) target:self argument:yourMenu order:0 modes:[NSArray … 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 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

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

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

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

You can add some conditions or use first one. Just create some extension for UIApplication. extension UIApplication { var statusBarUIView: UIView? { if #available(iOS 13.0, *) { let tag = 38482 let keyWindow = UIApplication.shared.windows.filter {$0.isKeyWindow}.first if let statusBar = keyWindow?.viewWithTag(tag) { return statusBar } else { guard let statusBarFrame = keyWindow?.windowScene?.statusBarManager?.statusBarFrame else { return … Read more

iOS 7 Status bar with Phonegap

I found an answer on another thread, but I’ll answer the question in case someone else wonders. Just replace the viewWillAppear in MainViewController.m with this: – (void)viewWillAppear:(BOOL)animated { // View defaults to full size. If you want to customize the view’s size, or its subviews (e.g. webView), // you can do so here. // Lower … 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