How to programmatically get iOS status bar height
I know that currently the status bar (with the time, battery, and network connection) at the top of the iPhone/iPad is 20 pixels for non-retina screens and 40 pixels for retina screens, but to future proof my app I would like to be able to determine this without hard coding values. Is it possible to figure out the height of the status bar programmatically? Kyr Dunenkoff [UIApplication sharedApplication].statusBarFrame.size.height . But since all sizes are in points, not in pixels, status bar height always equals 20. Update. Seeing this answer being considered helpful, I should elaborate.