initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// UINavigationController+Orientation.m
|
||||
// AVDemo
|
||||
//
|
||||
// 让导航控制器将方向决策交给顶层 ViewController
|
||||
//
|
||||
|
||||
#import "UINavigationController+Orientation.h"
|
||||
|
||||
@implementation UINavigationController (Orientation)
|
||||
|
||||
- (BOOL)shouldAutorotate {
|
||||
// 将决策权交给顶层 ViewController
|
||||
return [self.topViewController shouldAutorotate];
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||
// 将决策权交给顶层 ViewController
|
||||
return [self.topViewController supportedInterfaceOrientations];
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
|
||||
// 将决策权交给顶层 ViewController
|
||||
return [self.topViewController preferredInterfaceOrientationForPresentation];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user