cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject cordova-plugin-camera git commit: CB-8351 Use argumentForIndex rather than NSArray extension
Date Fri, 23 Jan 2015 14:51:08 GMT
Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 376bec2b9 -> 4f056f0a7


CB-8351 Use argumentForIndex rather than NSArray extension


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/4f056f0a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/4f056f0a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/4f056f0a

Branch: refs/heads/master
Commit: 4f056f0a73ff36bb34b172b0ba8bba16a4b06953
Parents: 376bec2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Jan 23 09:49:20 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Jan 23 09:49:20 2015 -0500

----------------------------------------------------------------------
 src/ios/CDVCamera.m | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/4f056f0a/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index 290e350..b80f259 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -42,24 +42,24 @@ static NSSet* org_apache_cordova_validArrowDirections;
 {
     CDVPictureOptions* pictureOptions = [[CDVPictureOptions alloc] init];
 
-    pictureOptions.quality = [arguments objectAtIndex:0 withDefault:@(50)];
-    pictureOptions.destinationType = [[arguments objectAtIndex:1 withDefault:@(DestinationTypeFileUri)]
unsignedIntegerValue];
-    pictureOptions.sourceType = [[arguments objectAtIndex:2 withDefault:@(UIImagePickerControllerSourceTypeCamera)]
unsignedIntegerValue];
+    pictureOptions.quality = [command argumentAtIndex:0 withDefault:@(50)];
+    pictureOptions.destinationType = [[command argumentAtIndex:1 withDefault:@(DestinationTypeFileUri)]
unsignedIntegerValue];
+    pictureOptions.sourceType = [[command argumentAtIndex:2 withDefault:@(UIImagePickerControllerSourceTypeCamera)]
unsignedIntegerValue];
     
-    NSNumber* targetWidth = [arguments objectAtIndex:3 withDefault:nil];
-    NSNumber* targetHeight = [arguments objectAtIndex:4 withDefault:nil];
+    NSNumber* targetWidth = [command argumentAtIndex:3 withDefault:nil];
+    NSNumber* targetHeight = [command argumentAtIndex:4 withDefault:nil];
     pictureOptions.targetSize = CGSizeMake(0, 0);
     if ((targetWidth != nil) && (targetHeight != nil)) {
         pictureOptions.targetSize = CGSizeMake([targetWidth floatValue], [targetHeight floatValue]);
     }
 
-    pictureOptions.encodingType = [[arguments objectAtIndex:5 withDefault:@(EncodingTypeJPEG)]
unsignedIntegerValue];
-    pictureOptions.mediaType = [[arguments objectAtIndex:6 withDefault:@(MediaTypePicture)]
unsignedIntegerValue];
-    pictureOptions.allowsEditing = [[arguments objectAtIndex:7 withDefault:@(NO)] boolValue];
-    pictureOptions.correctOrientation = [[arguments objectAtIndex:8 withDefault:@(NO)] boolValue];
-    pictureOptions.saveToPhotoAlbum = [[arguments objectAtIndex:9 withDefault:@(NO)] boolValue];
-    pictureOptions.popoverOptions = [arguments objectAtIndex:10 withDefault:nil];
-    pictureOptions.cameraDirection = [[arguments objectAtIndex:11 withDefault:@(UIImagePickerControllerCameraDeviceRear)]
unsignedIntegerValue];
+    pictureOptions.encodingType = [[command argumentAtIndex:5 withDefault:@(EncodingTypeJPEG)]
unsignedIntegerValue];
+    pictureOptions.mediaType = [[command argumentAtIndex:6 withDefault:@(MediaTypePicture)]
unsignedIntegerValue];
+    pictureOptions.allowsEditing = [[command argumentAtIndex:7 withDefault:@(NO)] boolValue];
+    pictureOptions.correctOrientation = [[command argumentAtIndex:8 withDefault:@(NO)] boolValue];
+    pictureOptions.saveToPhotoAlbum = [[command argumentAtIndex:9 withDefault:@(NO)] boolValue];
+    pictureOptions.popoverOptions = [command argumentAtIndex:10 withDefault:nil];
+    pictureOptions.cameraDirection = [[command argumentAtIndex:11 withDefault:@(UIImagePickerControllerCameraDeviceRear)]
unsignedIntegerValue];
     
     pictureOptions.popoverSupported = NO;
     pictureOptions.usesGeolocation = NO;
@@ -168,7 +168,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
 
 - (void)repositionPopover:(CDVInvokedUrlCommand*)command
 {
-    NSDictionary* options = [command.arguments objectAtIndex:0 withDefault:nil];
+    NSDictionary* options = [command argumentAtIndex:0 withDefault:nil];
 
     [self displayPopover:options];
 }


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


Mime
View raw message