The HIG (p.47) says that I have to be able to handle the double-height status bar that appears during phone calls or voice recordings.
How exactly do I handle this situation?
I really only have 1 screen where a keyboard with toolbar over it underlaps a textfield when the double-height status bar shows - on other screens things are just a bit scrunched up but useable.
If I could detect that a double-height status bar exists, I could maybe adjust the placement of the textfields or make them temporarily shorter but is it possible to detect when the double-height status bar is there?
EDIT: Maybe if there were a way to get the absolute coordinates of a known thing, like the nav bar, and if it was +20 pixels off, I'd assume that the double-height status bar is present. Thoughts?
And a secondary question, if this (or anything) works, I'd just like to hide the regular status bar using
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]
but I don't want to hide both - basically a lazy way not to have to touch any of my screens - if the double is there, make it a single again by hiding the regular status bar. Will the above code hide both?
Official height is 24dp , as is stated officially by Google on Android Design webpage. Save this answer.
Show/Hide Status Bar Navigate: From the View menu, select Status Bar.
This issue also occur when user use many other utilities like hotspot. To solve this issue I use following line of code ( as I was myself stuck in this ).
self.tabBarController?.tabBar.autoresizingMask = UIViewAutoresizing(rawValue: UIViewAutoresizing.RawValue(UInt8(UIViewAutoresizing.flexibleWidth.rawValue) | UInt8(UIViewAutoresizing.flexibleTopMargin.rawValue)))
Objective C reference for same issue available here
You can monitor these call-backs of UIApplicationDelegate:
application:willChangeStatusBarFrame:
application:didChangeStatusBarFrame:
And it's easy to test this in the iphone simulator: Hardware->Toggle In-Call Status Bar
Depending on your situation, your views and the things in them can resize automatically to fit the space - check the View Size area of the inspector window in Interface Builder on various objects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With