mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-31 12:42: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];
|
||||
[self displayPopover:options];
|
||||
} else {
|
||||
SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
|
||||
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.viewController presentViewController:cameraPicker animated:YES completion:nil];
|
||||
}
|
||||
self.hasPendingOperation = YES;
|
||||
}
|
||||
@ -266,11 +260,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
||||
cameraPicker.popoverController.delegate = nil;
|
||||
cameraPicker.popoverController = nil;
|
||||
} else {
|
||||
if ([cameraPicker respondsToSelector:@selector(presentingViewController)]) {
|
||||
[[cameraPicker presentingViewController] dismissModalViewControllerAnimated:YES];
|
||||
} else {
|
||||
[[cameraPicker parentViewController] dismissModalViewControllerAnimated:YES];
|
||||
}
|
||||
[[cameraPicker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
CDVPluginResult* result = nil;
|
||||
@ -386,12 +376,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
||||
{
|
||||
CDVCameraPicker* cameraPicker = (CDVCameraPicker*)picker;
|
||||
|
||||
if ([cameraPicker respondsToSelector:@selector(presentingViewController)]) {
|
||||
[[cameraPicker presentingViewController] dismissModalViewControllerAnimated:YES];
|
||||
} else {
|
||||
[[cameraPicker parentViewController] dismissModalViewControllerAnimated:YES];
|
||||
}
|
||||
// popoverControllerDidDismissPopover:(id)popoverController is called if popover is cancelled
|
||||
[[cameraPicker presentingViewController] dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
CDVPluginResult* result;
|
||||
if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusAuthorized) {
|
||||
|
Loading…
Reference in New Issue
Block a user