Permalink
Browse files

Added SystemOS Checker

  • Loading branch information...
1 parent dfb1634 commit 72a06cc0a002703e6cda6c551752956cd1dbce68 samyzee committed with nodemaker Nov 4, 2011
Showing with 12 additions and 0 deletions.
  1. +5 −0 src/Three20UICommon/Headers/TTGlobalUICommon.h
  2. +7 −0 src/Three20UICommon/Sources/TTGlobalUICommon.m
@@ -23,6 +23,11 @@
float TTOSVersion();
/**
+ * Checks if the run-time version of the OS is at least a certain version.
+ */
+BOOL TTRuntimeOSVersionIsAtLeast(float version);
+
+/**
* Checks if the link-time version of the OS is at least a certain version.
*/
BOOL TTOSVersionIsAtLeast(float version);
@@ -48,6 +48,13 @@ float TTOSVersion() {
return [[[UIDevice currentDevice] systemVersion] floatValue];
}
+///////////////////////////////////////////////////////////////////////////////////////////////////
+BOOL TTRuntimeOSVersionIsAtLeast(float version) {
+
+ static const CGFloat kEpsilon = 0.0000001f;
+ return TTOSVersion() - version > -kEpsilon;
+}
+
///////////////////////////////////////////////////////////////////////////////////////////////////
BOOL TTOSVersionIsAtLeast(float version) {

0 comments on commit 72a06cc

Please sign in to comment.