Onk*_*nka 5 iphone xcode objective-c uiinterfaceorientation ios6
我在用:
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
Run Code Online (Sandbox Code Playgroud)
如何在iOS6中将它用于纵向和颠倒?
这适用于景观左 UIInterfaceOrientationMaskLandscapeLeft
这对于风景吧 UIInterfaceOrientationMaskLandscapeRight
这适用于两种景观 UIInterfaceOrientationMaskLandscape
您需要返回您希望支持的方向的有效位掩码:
对于肖像和肖像颠倒:
- (NSUInteger)supportedInterfaceOrientations {
return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown);
}
Run Code Online (Sandbox Code Playgroud)
您可以看到支持的方向掩码列表
还需要注意的是,您还需要在支持的方向上颠倒纵向:

| 归档时间: |
|
| 查看次数: |
1911 次 |
| 最近记录: |