incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/2] ios commit: [ios] fixing IsIPad() macro to not depended on include order for correctness.
Date Fri, 07 Sep 2012 17:38:39 GMT
[ios] fixing IsIPad() macro to not depended on include order for correctness.

Fixes https://issues.apache.org/jira/browse/CB-1387


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/c0b09b05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/c0b09b05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/c0b09b05

Branch: refs/heads/master
Commit: c0b09b055e1f8803e44fdc75bd9f894728172f21
Parents: 73f77bf
Author: Michal Mocny <mmocny@gmail.com>
Authored: Fri Sep 7 09:58:49 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Sep 7 13:37:59 2012 -0400

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


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c0b09b05/CordovaLib/Classes/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVAvailability.h b/CordovaLib/Classes/CDVAvailability.h
index 9410a88..2fb3b6f 100644
--- a/CordovaLib/Classes/CDVAvailability.h
+++ b/CordovaLib/Classes/CDVAvailability.h
@@ -62,8 +62,4 @@
                         (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100, \
                         (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100 ]
 
-#ifdef UI_USER_INTERFACE_IDIOM
-#define IsIPad() (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-#else
-#define IsIPad() NO
-#endif
+#define IsIPad() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)]
&& ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad))
\ No newline at end of file


Mime
View raw message