Last active
August 29, 2015 14:07
-
-
Save sam-w/a4d930185d73023c84ba to your computer and use it in GitHub Desktop.
UIApplication (OrientationCorrectedStatusBarFrame)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation UIApplication (OrientationCorrectedStatusBarFrame) | |
//When device is in landscape orientation, we get CGRect(0, 0, 20, 1024) for statusBarFrame. This corrects the frame based on device orientation. | |
- (CGRect)orientationCorrectedStatusBarFrame | |
{ | |
return [self.delegate.window.rootViewController.view convertRect:self.statusBarFrame fromView:self.delegate.window]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment