[ios] Portrait upside-down fix.

This commit is contained in:
Timur Bernikowich 2014-12-25 16:41:06 +03:00 committed by Alex Zolotarev
parent 8c30141427
commit d73d359c13
2 changed files with 22 additions and 0 deletions

View file

@ -89,4 +89,11 @@ typedef void (^UIAlertViewCompletionBlock) (UIAlertView * alertView, NSInteger b
@property (copy, nonatomic) BOOL(^shouldEnableFirstOtherButtonBlock)(UIAlertView * alertView);
@end
@interface UINavigationController (Autorotate)
- (BOOL)shouldAutorotate;
- (NSUInteger)supportedInterfaceOrientations;
@end

View file

@ -444,3 +444,18 @@ static const void * UIAlertViewShouldEnableFirstOtherButtonBlockKey = & UIAlert
}
@end
@implementation UINavigationController (Autorotate)
- (BOOL)shouldAutorotate
{
return [[self.viewControllers lastObject] shouldAutorotate];
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
@end