Conflicting return type in implementation of 'supportedInterfaceOrientations': - Warning

后端 未结 3 1358
無奈伤痛
無奈伤痛 2020-12-07 17:42

After upgrading to Xcode 7.0 I get a warning in the UIViewControllerRotation method: - (NSUInteger)supportedInterfaceOrientations:

Confli

3条回答
  •  生来不讨喜
    2020-12-07 18:20

    Try this tweak:

    #if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
    - (NSUInteger)supportedInterfaceOrientations  
    #else  
    - (UIInterfaceOrientationMask)supportedInterfaceOrientations  
    #endif  
    {
       return UIInterfaceOrientationMaskPortrait;
    }
    

提交回复
热议问题