Conflicting return type in implementation of 'supportedInterfaceOrientations': 'UIInterfaceOrientationMask' (aka 'enum UIInterfaceOrientationMask') vs 'NSUInteger' (aka 'unsigned long')
iOS 9 以降は、戻り値の型を変更します。
- (NSUInteger)supportedInterfaceOrientations ↓ - (UIInterfaceOrientationMask)supportedInterfaceOrientations
iOS 9 未満をサポートする場合、処理を分けると便利です。
- #if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- - (NSUInteger)supportedInterfaceOrientations
- #else
- - (UIInterfaceOrientationMask)supportedInterfaceOrientations
- #endif
- {
- return UIInterfaceOrientationMaskPortrait;
- }