Get screen/application/status bar frame dimensions


CGRect rect;
// Get screen dimensions
rect = [[UIScreen mainScreen] bounds];
NSLog(@"Bounds: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
// Get application frame dimensions (basically screen - status bar)
rect = [[UIScreen mainScreen] applicationFrame];
NSLog(@"App Frame: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
// Get status bar frame dimensions
rect = [[UIApplication sharedApplication] statusBarFrame];
NSLog(@"Statusbar frame: %1.0f, %1.0f, %1.0f, %1.0f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);