mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-02-07 18:12:50 +08:00
Remove deprecated symbols for iOS < 6
This commit is contained in:
parent
4c901d56be
commit
7b60a0b6d1
@ -151,13 +151,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
NSDictionary* options = [command.arguments objectAtIndex:10 withDefault:nil];
|
NSDictionary* options = [command.arguments objectAtIndex:10 withDefault:nil];
|
||||||
[self displayPopover:options];
|
[self displayPopover:options];
|
||||||
} else {
|
} else {
|
||||||
SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
|
[self.viewController presentViewController:cameraPicker animated:YES completion:nil];
|
||||||
if ([self.viewController respondsToSelector:selector]) {
|
|
||||||
[self.viewController presentViewController:cameraPicker animated:YES completion:nil];
|
|
||||||
} else {
|
|
||||||
// deprecated as of iOS >= 6.0
|
|
||||||
[self.viewController presentModalViewController:cameraPicker animated:YES];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
self.hasPendingOperation = YES;
|
self.hasPendingOperation = YES;
|
||||||
}
|
}
|
||||||
@ -266,11 +260,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
cameraPicker.popoverController.delegate = nil;
|
cameraPicker.popoverController.delegate = nil;
|
||||||
cameraPicker.popoverController = nil;
|
cameraPicker.popoverController = nil;
|
||||||
} else {
|
} else {
|
||||||
if ([cameraPicker respondsToSelector:@selector(presentingViewController)]) {
|
[[cameraPicker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
|
||||||
[[cameraPicker presentingViewController] dismissModalViewControllerAnimated:YES];
|
|
||||||
} else {
|
|
||||||
[[cameraPicker parentViewController] dismissModalViewControllerAnimated:YES];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CDVPluginResult* result = nil;
|
CDVPluginResult* result = nil;
|
||||||
@ -386,12 +376,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
{
|
{
|
||||||
CDVCameraPicker* cameraPicker = (CDVCameraPicker*)picker;
|
CDVCameraPicker* cameraPicker = (CDVCameraPicker*)picker;
|
||||||
|
|
||||||
if ([cameraPicker respondsToSelector:@selector(presentingViewController)]) {
|
[[cameraPicker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
|
||||||
[[cameraPicker presentingViewController] dismissModalViewControllerAnimated:YES];
|
|
||||||
} else {
|
|
||||||
[[cameraPicker parentViewController] dismissModalViewControllerAnimated:YES];
|
|
||||||
}
|
|
||||||
// popoverControllerDidDismissPopover:(id)popoverController is called if popover is cancelled
|
|
||||||
|
|
||||||
CDVPluginResult* result;
|
CDVPluginResult* result;
|
||||||
if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusAuthorized) {
|
if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusAuthorized) {
|
||||||
|
Loading…
Reference in New Issue
Block a user