我遇到了设备方向问题。我有一个有一些视图的 iPhone 应用程序,除了一个视图之外,所有视图都不应该旋转。所以我看看里面Info.plist
;我选择了两个设备方向,纵向和横向,在视图中我不想旋转,所以我放了这个。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return NO;
}
但所有的观点都会旋转。即使有这些线条。如果改成Info.plist
不支持人像。它工作正常,只是我想旋转的视图,我把
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
它不起作用。我使用 iOS 6。也尝试过
- (NSUInteger)supportedInterfaceOrientations
- (BOOL)shouldAutorotate