Skip to content
This repository
Browse code

Added SystemOS Checker

  • Loading branch information...
commit 72a06cc0a002703e6cda6c551752956cd1dbce68 1 parent dfb1634
authored November 04, 2011
5  src/Three20UICommon/Headers/TTGlobalUICommon.h
@@ -23,6 +23,11 @@
23 23
 float TTOSVersion();
24 24
 
25 25
 /**
  26
+ * Checks if the run-time version of the OS is at least a certain version.
  27
+ */
  28
+BOOL TTRuntimeOSVersionIsAtLeast(float version);
  29
+
  30
+/**
26 31
  * Checks if the link-time version of the OS is at least a certain version.
27 32
  */
28 33
 BOOL TTOSVersionIsAtLeast(float version);
7  src/Three20UICommon/Sources/TTGlobalUICommon.m
@@ -48,6 +48,13 @@ float TTOSVersion() {
48 48
   return [[[UIDevice currentDevice] systemVersion] floatValue];
49 49
 }
50 50
 
  51
+///////////////////////////////////////////////////////////////////////////////////////////////////
  52
+BOOL TTRuntimeOSVersionIsAtLeast(float version) {
  53
+
  54
+    static const CGFloat kEpsilon = 0.0000001f;
  55
+    return TTOSVersion() - version > -kEpsilon;
  56
+}
  57
+
51 58
 
52 59
 ///////////////////////////////////////////////////////////////////////////////////////////////////
53 60
 BOOL TTOSVersionIsAtLeast(float version) {

0 notes on commit 72a06cc

Please sign in to comment.
Something went wrong with that request. Please try again.