I use it to check iOS version, but it doesn't work:
#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_5_0
#define kCFCoreFoundationVersionNumber_iPhoneOS_5_0 675.000000
#endif
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_5_0
#define IF_IOS5_OR_GREATER(...) \
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_5_0) \
{ \
__VA_ARGS__ \
}
#else
#define IF_IOS5_OR_GREATER 0
#endif
when I make
#if IF_IOS5_OR_GREATER
NSLog(@"iOS5");
#endif
nothing happens. Is something wrong here?
With Macro Control on, your Camera app displays a macro button when your iPhone is within macro distance of a subject. Tap the macro button to turn off automatic macro switching, and tap it again to turn automatic macro switching back on.
Much simpler:
#define IS_IOS6_AND_UP ([[UIDevice currentDevice].systemVersion floatValue] >= 6.0)
#ifdef __IPHONE_5_0
etc
Just look for that constant. All the objective c constants start with two underscores
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With