Skip to content
Permalink
Browse files
ios: Use inline copies of deprecated CDV_IsIpad and CDV_IsIphone5
  • Loading branch information
agrieve committed Jan 27, 2015
1 parent 0f187eb commit 3374bf41d40283afc8ac90885b87a26fbc3dae41
Showing 1 changed file with 3 additions and 2 deletions.
@@ -575,7 +575,7 @@ - (NSString*)resolveImageResource:(NSString*)resource
// 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 @@ - (void)loadView
// 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";
}

0 comments on commit 3374bf4

Please sign in to comment.