-
Notifications
You must be signed in to change notification settings - Fork 1
/
BaseNavigationController.m
executable file
·41 lines (31 loc) · 1.12 KB
/
BaseNavigationController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// BaseNavigationController.m
// iShare
//
// Created by caoyong on 11/1/15.
// Copyright © 2015 caoyong. All rights reserved.
//
#import "BaseNavigationController.h"
@implementation BaseNavigationController
- (BOOL)shouldAutorotate{
return [self.visibleViewController shouldAutorotate];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
return [self.visibleViewController preferredInterfaceOrientationForPresentation];
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
if (![self.visibleViewController isKindOfClass:[UIAlertController class]]) {//iOS9 UIWebRotatingAlertController
return [self.visibleViewController supportedInterfaceOrientations];
}else{
return UIInterfaceOrientationMaskPortrait;
}
}
@end
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/