【发布时间】:2014-03-04 03:53:53
【问题描述】:
我已经实现了正确的功能,但它们没有被触发?我在 StackOverFlow 上尝试了几种解决方案,但没有一个有效。我已经尝试将视图添加到 UINavigationController,也不起作用。
FakeIDDetailViewController.h:
@interface FakeIDDetailViewController : UIViewController
@end
FakeIDDetailViewController.m:
@interface FakeIDDetailViewController ()
-(BOOL)shouldAutorotate
{
return NO;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (UIInterfaceOrientationMaskLandscapeLeft);
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeLeft;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
return UIInterfaceOrientationLandscapeLeft;
}
【问题讨论】:
-
您尝试过哪些 SO 解决方案?正如你所说,有几个......我不想一一列举。
-
@Jim Clermonts 如果其中一个有帮助,您应该接受答案
标签: objective-c xcode uiviewcontroller orientation