I'm shifting between Xcode 6 and 7 quite frequently, and want a way to avoid build warnings like this one.
Conflicting return type in implementation of 'supportedInterfaceOrientations': 'UIInterfaceOrientationMask' (aka 'enum UIInterfaceOrientationMask') vs 'NSUInteger' (aka 'unsigned long')
I can't seem to use a type that will satisfy both versions of Xcode simultaneously. So I was going to implement a preprocessor macro which had different values depending on the value of __IPHONE_9_0.
#ifdef __IPHONE_9_0
#define CompatibilityUserInterfaceMask UIInterfaceOrientationMask
#else
#define CompatibilityUserInterfaceMask NSUInteger
#endif
When I try and implement this though I get a build error.
- (CompatibilityUserInterfaceMask)supportedInterfaceOrientations { ... }
Is this possible, or does anyone have other ideas to achieve the same outcome?