Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove legacy

  • Loading branch information...
commit d2341adc1b6dde60f7d9794db33a01074965e00e 1 parent 3f9d1d4
@steipete authored
Showing with 12 additions and 45 deletions.
  1. +10 −34 PSCompatibility.h
  2. +2 −11 PSCompatibility.m
View
44 PSCompatibility.h
@@ -5,36 +5,9 @@
// Copyright 2010 Peter Steinberger. All rights reserved.
//
-// http://blancer.com/tutorials/i-phone/72236/tips-tricks-for-conditional-ios3-ios3-2-and-ios4-code/
-
-#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_2_0
-#define kCFCoreFoundationVersionNumber_iPhoneOS_2_0 478.23
-#endif
-
-#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_2_1
-#define kCFCoreFoundationVersionNumber_iPhoneOS_2_1 478.26
-#endif
-
-#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_2_2
-#define kCFCoreFoundationVersionNumber_iPhoneOS_2_2 478.29
-#endif
-
-#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_3_0
-#define kCFCoreFoundationVersionNumber_iPhoneOS_3_0 478.47
-#endif
-
-#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_3_1
-#define kCFCoreFoundationVersionNumber_iPhoneOS_3_1 478.52
-#endif
-
-#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_3_2
-#define kCFCoreFoundationVersionNumber_iPhoneOS_3_2 478.61
-#endif
-
#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0
#define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32
#endif
-
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
#define IF_IOS4_OR_GREATER(...) \
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_4_0) \
@@ -48,21 +21,24 @@ __VA_ARGS__ \
#define IF_PRE_IOS4(...) \
if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_4_0) \
{ \
- __VA_ARGS__ \
+__VA_ARGS__ \
}
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 32000
-#define IF_3_2_OR_GREATER(...) \
-if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_2) \
+#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_5_0
+#define kCFCoreFoundationVersionNumber_iPhoneOS_5_0 666.1
+#endif
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000
+#define IF_IOS5_OR_GREATER(...) \
+if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_5_0) \
{ \
__VA_ARGS__ \
}
#else
-#define IF_3_2_OR_GREATER(...)
+#define IF_IOS5_OR_GREATER(...)
#endif
-#define IF_PRE_3_2(...) \
-if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_3_2) \
+#define IF_PRE_IOS5(...) \
+if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_5_0) \
{ \
__VA_ARGS__ \
}
View
13 PSCompatibility.m
@@ -8,15 +8,6 @@
#import "PSCompatibility.h"
-BOOL isIPad(void)
-{
- IF_3_2_OR_GREATER
- (
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
- {
- return YES;
- }
- );
-
- return NO;
+BOOL isIPad(void) {
+ return [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;
}
Please sign in to comment.
Something went wrong with that request. Please try again.