我不知道如何在iOS 6中进行纵向和颠倒

Onk*_*nka 5 iphone xcode objective-c uiinterfaceorientation ios6

我在用:

- (NSUInteger)supportedInterfaceOrientations {

    return UIInterfaceOrientationMaskPortrait; 

}
Run Code Online (Sandbox Code Playgroud)

如何在iOS6中将它用于纵向和颠倒?

这适用于景观左 UIInterfaceOrientationMaskLandscapeLeft

这对于风景吧 UIInterfaceOrientationMaskLandscapeRight

这适用于两种景观 UIInterfaceOrientationMaskLandscape

Abi*_*ern 6

您需要返回您希望支持的方向的有效位掩码:

对于肖像和肖像颠倒:

- (NSUInteger)supportedInterfaceOrientations {

    return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown);

}
Run Code Online (Sandbox Code Playgroud)

您可以看到支持的方向掩码列表

还需要注意的是,您还需要在支持的方向上颠倒纵向:

在此输入图像描述