Delete deprecated method "closePicker" from CDVCamera.

It was slated to be removed for 2.0.


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/32472610
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/32472610
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/32472610

Branch: refs/heads/master
Commit: 32472610f57fd6668bd1e71ad9dc64f22d53264c
Parents: 686509f
Author: Andrew Grieve <agri...@chromium.org>
Authored: Fri Oct 5 16:04:57 2012 -0400
Committer: Andrew Grieve <agri...@chromium.org>
Committed: Fri Oct 5 16:04:57 2012 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVCamera.h |    2 --
 CordovaLib/Classes/CDVCamera.m |   23 ++++-------------------
 2 files changed, 4 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/32472610/CordovaLib/Classes/CDVCamera.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCamera.h b/CordovaLib/Classes/CDVCamera.h
index 64a9d9e..2905a8a 100644
--- a/CordovaLib/Classes/CDVCamera.h
+++ b/CordovaLib/Classes/CDVCamera.h
@@ -87,6 +87,4 @@ typedef NSUInteger CDVMediaType;
 - (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage 
toSize:(CGSize)frameSize;
 - (UIImage*)imageCorrectedForCaptureOrientation:(UIImage*)anImage;
 
-- (void)closePicker:(CDVCameraPicker*)picker __attribute__((deprecated));
-
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/32472610/CordovaLib/Classes/CDVCamera.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCamera.m b/CordovaLib/Classes/CDVCamera.m
index 33338bd..f93b994 100644
--- a/CordovaLib/Classes/CDVCamera.m
+++ b/CordovaLib/Classes/CDVCamera.m
@@ -86,7 +86,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
     NSNumber* targetWidth = [arguments objectAtIndex:3];
     NSNumber* targetHeight = [arguments objectAtIndex:4];
     NSNumber* mediaValue = [arguments objectAtIndex:6];
-    CDVMediaType mediaType = (mediaValue) ?[mediaValue intValue] : 
MediaTypePicture;
+    CDVMediaType mediaType = (mediaValue) ? [mediaValue intValue] : 
MediaTypePicture;
 
     CGSize targetSize = CGSizeMake(0, 0);
     if ((targetWidth != nil) && (targetHeight != nil)) {
@@ -109,10 +109,10 @@ static NSSet* org_apache_cordova_validArrowDirections;
     cameraPicker.correctOrientation = [[arguments objectAtIndex:8] boolValue];
     cameraPicker.saveToPhotoAlbum = [[arguments objectAtIndex:9] boolValue];
 
-    cameraPicker.encodingType = ([arguments objectAtIndex:5]) ?[[arguments 
objectAtIndex:5] intValue] : EncodingTypeJPEG;
+    cameraPicker.encodingType = ([arguments objectAtIndex:5]) ? [[arguments 
objectAtIndex:5] intValue] : EncodingTypeJPEG;
 
-    cameraPicker.quality = ([arguments objectAtIndex:0]) ?[[arguments 
objectAtIndex:0] intValue] : 50;
-    cameraPicker.returnType = ([arguments objectAtIndex:1]) ?[[arguments 
objectAtIndex:1] intValue] : DestinationTypeFileUri;
+    cameraPicker.quality = ([arguments objectAtIndex:0]) ? [[arguments 
objectAtIndex:0] intValue] : 50;
+    cameraPicker.returnType = ([arguments objectAtIndex:1]) ? [[arguments 
objectAtIndex:1] intValue] : DestinationTypeFileUri;
 
     if (sourceType == UIImagePickerControllerSourceTypeCamera) {
         // we only allow taking pictures (no video) in this api
@@ -312,21 +312,6 @@ static NSSet* org_apache_cordova_validArrowDirections;
     [self imagePickerController:picker 
didFinishPickingMediaWithInfo:imageInfo];
 }
 
-- (void)closePicker:(CDVCameraPicker*)cameraPicker
-{
-    NSLog(@"closePicker is DEPRECATED and will be removed in 2.0!");
-    if ([cameraPicker respondsToSelector:@selector(presentingViewController)]) 
{
-        [[cameraPicker presentingViewController] 
dismissModalViewControllerAnimated:YES];
-    } else {
-        [[cameraPicker parentViewController] 
dismissModalViewControllerAnimated:YES];
-    }
-
-    if (cameraPicker.popoverSupported && (cameraPicker.popoverController != 
nil)) {
-        cameraPicker.popoverController.delegate = nil;
-        cameraPicker.popoverController = nil;
-    }
-}
-
 - (void)imagePickerControllerDidCancel:(UIImagePickerController*)picker
 {
     CDVCameraPicker* cameraPicker = (CDVCameraPicker*)picker;

Reply via email to