Files
SellyCloudSDK_demo/Example/SellyCloudSDK/Controllers/UINavigationController+Orientation.m
2026-03-01 15:59:27 +08:00

28 lines
751 B
Objective-C

//
// 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