incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Added CDV_IsIPhone5 macro
Date Thu, 20 Sep 2012 01:34:34 GMT
Updated Branches:
  refs/heads/master 5c5297504 -> 5bbae2c46


Added CDV_IsIPhone5 macro


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/5bbae2c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/5bbae2c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/5bbae2c4

Branch: refs/heads/master
Commit: 5bbae2c4689aaa8fa5b66359db35576d24fc2830
Parents: 5c52975
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Sep 19 18:34:45 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Sep 19 18:34:45 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVAvailability.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/5bbae2c4/CordovaLib/Classes/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h
index 77d05f6..4b73e9f 100644
--- a/CordovaLib/Classes/CDVAvailability.h
+++ b/CordovaLib/Classes/CDVAvailability.h
@@ -58,6 +58,8 @@
 
 #define CDV_IsIPad() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)]
&& ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad))
 
+#define CDV_IsIPhone5() ([[UIScreen mainScreen] bounds].size.height == 568 && [[UIScreen
mainScreen] bounds].size.width == 320)
+
 /* Return the string version of the decimal version */
 #define CDV_VERSION  [NSString stringWithFormat:@"%d.%d.%d", \
                         (CORDOVA_VERSION_MIN_REQUIRED / 10000), \


Mime
View raw message