iOS 6 supportedInterfaceOrientations issue

后端 未结 5 1109
傲寒
傲寒 2021-01-17 06:10

In my view controller, I implement two methods for controlling interface orientation:

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOr         


        
5条回答
  •  天命终不由人
    2021-01-17 06:40

    - (BOOL) shouldAutorotate {
        return YES;
    }
    
    // for landscape
    - (NSInteger) supportedInterfaceOrientations {
        return (1 << UIInterfaceOrientationLandscapeLeft) | 
               (1 << UIInterfaceOrientationLandscapeRight);
    }
    

    As noted above, check out the mask values for specific orientations : UIInterfaceOrientationMask values.UIInterfaceOrientationMask

提交回复
热议问题