cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/2] cordova-plugin-media-capture git commit: ios: Use inline copies of deprecated CDV_IsIpad and CDV_IsIphone5
Date Tue, 27 Jan 2015 16:35:26 GMT
ios: Use inline copies of deprecated CDV_IsIpad and CDV_IsIphone5


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/3374bf41
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/3374bf41
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/3374bf41

Branch: refs/heads/master
Commit: 3374bf41d40283afc8ac90885b87a26fbc3dae41
Parents: 0f187eb
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Jan 27 11:35:03 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Jan 27 11:35:03 2015 -0500

----------------------------------------------------------------------
 src/ios/CDVCapture.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/3374bf41/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 48dd65f..5bffcea 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -575,7 +575,7 @@
     // if user wants iPhone only app to run on iPad they must remove *~ipad.* images from
CDVCapture.bundle
     if (isLessThaniOS4) {
         NSString* iPadResource = [NSString stringWithFormat:@"%@~ipad.png", resource];
-        if (CDV_IsIPad() && [UIImage imageNamed:iPadResource]) {
+        if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad &&
[UIImage imageNamed:iPadResource]) {
             return iPadResource;
         } else {
             return [NSString stringWithFormat:@"%@.png", resource];
@@ -614,7 +614,8 @@
     // make backgrounds
     NSString* microphoneResource = @"CDVCapture.bundle/microphone";
 
-    if (CDV_IsIPhone5()) {
+    BOOL isIphone5 = ([[UIScreen mainScreen] bounds].size.width == 568 && [[UIScreen
mainScreen] bounds].size.height == 320) || ([[UIScreen mainScreen] bounds].size.height ==
568 && [[UIScreen mainScreen] bounds].size.width == 320);
+    if (isIphone5) {
         microphoneResource = @"CDVCapture.bundle/microphone-568h";
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message