You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2016/07/31 16:25:13 UTC

cordova-plugin-camera git commit: CB-11410: (ios) fix cameraPopoverHandle.setPosition

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 4e439d85c -> 3f8c53f7f


CB-11410: (ios) fix cameraPopoverHandle.setPosition

 This closes #224


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/3f8c53f7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/3f8c53f7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/3f8c53f7

Branch: refs/heads/master
Commit: 3f8c53f7f35970f9ceb9fa5eee18febfd6febb9a
Parents: 4e439d8
Author: Julio C�sar <jc...@gmail.com>
Authored: Sun Jul 31 17:13:57 2016 +0200
Committer: Julio C�sar <jc...@gmail.com>
Committed: Sun Jul 31 18:25:03 2016 +0200

----------------------------------------------------------------------
 src/ios/CDVCamera.m | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/3f8c53f7/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index 42dd469..f2b17f4 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -240,9 +240,13 @@ static NSString* toBase64(NSData* data) {
 
 - (void)repositionPopover:(CDVInvokedUrlCommand*)command
 {
-    NSDictionary* options = [command argumentAtIndex:0 withDefault:nil];
+    if (([[self pickerController] pickerPopoverController] != nil) && [[[self pickerController] pickerPopoverController] isPopoverVisible]) {
 
-    [self displayPopover:options];
+        [[[self pickerController] pickerPopoverController] dismissPopoverAnimated:NO];
+
+        NSDictionary* options = [command argumentAtIndex:0 withDefault:nil];
+        [self displayPopover:options];
+    }
 }
 
 - (NSInteger)integerValueForKey:(NSDictionary*)dict key:(NSString*)key defaultValue:(NSInteger)defaultValue


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