Commit a36e2a1bec366d1b79ab410db20157b2f68bb287
1 parent
caa0bc56
no message
Showing
1 changed file
with
2 additions
and
15 deletions
CNLiveScioLive/Pages/SDK/XLSlideMenu/XLSlideMenu.m
| @@ -28,15 +28,7 @@ static CGFloat MinActionSpeed = 500; | @@ -28,15 +28,7 @@ static CGFloat MinActionSpeed = 500; | ||
| 28 | @end | 28 | @end |
| 29 | 29 | ||
| 30 | @implementation XLSlideMenu | 30 | @implementation XLSlideMenu |
| 31 | -- (void)viewWillAppear:(BOOL)animated { | ||
| 32 | - NSNumber *orientationUnknown = [NSNumber numberWithInt:UIInterfaceOrientationUnknown]; | ||
| 33 | - [[UIDevice currentDevice] setValue:orientationUnknown forKey:@"orientation"]; | ||
| 34 | - | ||
| 35 | - NSNumber *orientationTarget = [NSNumber numberWithInt:UIInterfaceOrientationMaskPortrait]; | ||
| 36 | - [[UIDevice currentDevice] setValue:orientationTarget forKey:@"orientation"]; | ||
| 37 | - | ||
| 38 | - [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait]; | ||
| 39 | -} | 31 | + |
| 40 | - (instancetype)initWithRootViewController:(UIViewController*)rootViewController{ | 32 | - (instancetype)initWithRootViewController:(UIViewController*)rootViewController{ |
| 41 | if (self = [super init]) { | 33 | if (self = [super init]) { |
| 42 | _rootViewController = rootViewController; | 34 | _rootViewController = rootViewController; |
| @@ -326,12 +318,7 @@ static CGFloat MinActionSpeed = 500; | @@ -326,12 +318,7 @@ static CGFloat MinActionSpeed = 500; | ||
| 326 | 318 | ||
| 327 | //取消自动旋转 | 319 | //取消自动旋转 |
| 328 | - (BOOL)shouldAutorotate { | 320 | - (BOOL)shouldAutorotate { |
| 329 | - return NO; | ||
| 330 | -} | ||
| 331 | - | ||
| 332 | -- (UIInterfaceOrientationMask)supportedInterfaceOrientations { | ||
| 333 | - return UIInterfaceOrientationMaskPortrait; | ||
| 334 | - | 321 | + return _rootViewController.shouldAutorotate; |
| 335 | } | 322 | } |
| 336 | 323 | ||
| 337 | - (void)didReceiveMemoryWarning { | 324 | - (void)didReceiveMemoryWarning { |