Update for iOS7. Even though status bar visual style changed, it's still there, its frame still behaves the same.
- Statusbar - Apache Cordova.
- download games for mobile nokia 2690.
- samsung galaxy s3 task manager on home screen;
This, too, won't affect status bar height in any way. Go with Martin's suggestion to the question: Get iPhone Status Bar Height. The following code, which would go in your custom subclass of UIViewController , almost worked to support landscape. Just try it, and you'll see for yourself. Hardcoding the height to 20pt will usually work, until it doesn't.
That may be of use, and is certainly less hack than many of the previous solutions. Don't forget that the status bar's frame will be in the screen's coordinate space!
If you launch in landscape mode, you may find that width and height are swapped. I strongly recommend that you use this version of the code instead if you support landscape orientations:. You can then read statusBarFrame's height property directly. Incidentally, not only may the status bar be taller during phone calls, it can also be zero if the status bar has been deliberately hidden. These are included as a standard function in a project of mine: More info: So by using this method you can easily calculate the status bar height without worring about status bar height change due to phone calls.
Using following single line code you can get status bar height in any orientation and also if it is visible or not. Thank you for your interest in this question.
Screen sizes and breakpoints
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site the association bonus does not count. Would you like to answer one of these unanswered questions instead? How to programmatically get iOS status bar height Ask Question. Kyr Dunenkoff 7, 3 18 Seeing this answer being considered helpful, I should elaborate.
Step One: Install Material Status Bar and Grant It Permissions
Status bar height is, indeed, equals Kyr Dunenkoff Kyr Dunenkoff 7, 3 18 Not quite: MarcMosby, see my update. Remembered this issue - thanks to you. Yes, as Marc pointed on iOS7 it yeilds sometimes and 20 sometimes. So this is no longer a fool proof way of determining the height.
I doubt this is because of the transparent nature of the status bar on iOS 7. It could be that, it first goes to full screen and then resizes itself.
So if you app queries during this transition, you might get the wrong value. May be calling this method with a delay might help on iOS 7.
Also on iPhone X status bar will be higher. Anyway, it's the only working solution.
Old Answer The following code, which would go in your custom subclass of UIViewController , almost worked to support landscape. This is not correct. The height of the status bar does not changes when you rotate the device. The width would, but the code above does not show that, nor was that the original question. You're right that "the height of the status bar does not changes when you rotate the device. This is an interesting issue I have been seeing now as well. It looks like a bug to me on Apple's side, but still needs to be accounted for.
Status Bar (SystemTray) in Windows Phone
On iOS 7, set the status bar style. Available options default, lightcontent, blacktranslucent, blackopaque. Defaults to false so you can listen to the "statusTap" event described below and customize the behavior instead.
One way to do that would be:. During runtime you can use the StatusBar. If you edit it manually without Xcode, the keys and values are:. Although in the global scope, it is not available until after the deviceready event. On iOS 7, set to false to make the statusbar appear like iOS 6. Set the style and background color to suit using the other functions.