我正在开发一个 iPad 应用程序。它是在弹出窗口中捕获图像并在下一个视图中全屏裁剪图像。这里它由以下屏幕组成
1)LoginViewContoller(需要所有方向),
2)SplitViewController(需要所有方向),`
3)ImageCropViewController(只需要风景),
4)SettingsViewController(需要所有方向)。
在ImageCropViewController我正在编写以下代码:
- (BOOL)shouldAutorotate
{
return NO;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
我得到了确切的方向。但它的作用LoginViewController's和SettingViewController's方向也是。
在LoginViewControllerandSettingViewController中,我正在编写以下代码
- (BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape | UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
SplitViewController在从to导航时ImageCropViewController,我正在启动ImageCropViewControlleras rootViewController。
在 plist 我支持这样的方向
我用谷歌搜索了它。并整合了可用的代码。但我没有找到任何解决方案。请帮我。它真的在浪费我的时间。
