Ios 将UISplitViewController详细视图限制为特定方向
我想在iPhone上将细节视图限制为横向,并允许主视图使用任何方向 因此,我向详图视图控制器添加了以下内容:Ios 将UISplitViewController详细视图限制为特定方向,ios,objective-c,Ios,Objective C,我想在iPhone上将细节视图限制为横向,并允许主视图使用任何方向 因此,我向详图视图控制器添加了以下内容: - (BOOL)shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { return U
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
return UIInterfaceOrientationMaskLandscape;
} else {
return UIInterfaceOrientationMaskAll;
}
}
已调用supportedInterfaceOrientations,但不起作用。不调用shouldAutorotate。如何在iOS 8上实现所需的行为