Updated Branches: refs/heads/master 5bbae2c46 -> 1dd9b330c
[CB-1502] Update Capture Audio images for iPhone 5 (partial fix - image is still placeholder) 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/1dd9b330 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/1dd9b330 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/1dd9b330 Branch: refs/heads/master Commit: 1dd9b330c4f7e613e93525b21a10e4ee20984cc4 Parents: 5bbae2c Author: Shazron Abdullah <shaz...@apache.org> Authored: Wed Sep 19 18:36:50 2012 -0700 Committer: Shazron Abdullah <shaz...@apache.org> Committed: Wed Sep 19 18:36:50 2012 -0700 ---------------------------------------------------------------------- CordovaLib/Classes/CDVCapture.m | 9 ++++++++- CordovaLib/Classes/CDVViewController.m | 2 +- .../Resources/Capture.bundle/microphone-568h.png | Bin 0 -> 516905 bytes 3 files changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/1dd9b330/CordovaLib/Classes/CDVCapture.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVCapture.m b/CordovaLib/Classes/CDVCapture.m index 0466f12..aaa5b03 100644 --- a/CordovaLib/Classes/CDVCapture.m +++ b/CordovaLib/Classes/CDVCapture.m @@ -588,8 +588,15 @@ UIView *tmp = [[UIView alloc] initWithFrame:viewRect]; // make backgrounds + NSString* microphoneResource = @"Capture.bundle/microphone"; + if (CDV_IsIPhone5()) { + microphoneResource = @"Capture.bundle/microphone-568h"; + } - UIImage* microphone = [UIImage imageNamed:[self resolveImageResource:@"Capture.bundle/microphone"]]; + UIImage* microphone = [UIImage imageNamed:[self resolveImageResource:microphoneResource]]; + if (CDV_IsIPhone5()) { // need to set it to 2.0x if not it will be 1.0 scale but too big for the screen + microphone = [UIImage imageWithCGImage:microphone.CGImage scale:2.0f orientation:UIImageOrientationUp]; + } UIView* microphoneView = [[UIView alloc] initWithFrame: CGRectMake(0,0,viewRect.size.width, microphone.size.height)]; [microphoneView setBackgroundColor:[UIColor colorWithPatternImage:microphone]]; [microphoneView setUserInteractionEnabled: NO]; http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/1dd9b330/CordovaLib/Classes/CDVViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index cf4dfd8..f7a2054 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -663,7 +663,7 @@ CGRect screenBounds = [[UIScreen mainScreen] bounds]; NSString* launchImageFile = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; if (launchImageFile == nil) { // fallback if no launch image was specified - if (screenBounds.size.height == 568) { + if (CDV_IsIPhone5()) { // iPhone 5 or iPod Touch 6th-gen launchImageFile = @"Default-568h"; } else { http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/1dd9b330/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone-568h.png ---------------------------------------------------------------------- diff --git a/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone-568h.png b/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone-568h.png new file mode 100644 index 0000000..4a90af2 Binary files /dev/null and b/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone-568h.png differ