mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-31 12:42:50 +08:00
[CB-4823] Fix XCode 5 camera plugin warnings
This commit is contained in:
parent
224e7cfb20
commit
9bcf725e39
@ -150,9 +150,11 @@ 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 {
|
||||||
if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
|
SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
|
||||||
|
if ([self.viewController respondsToSelector:selector]) {
|
||||||
[self.viewController presentViewController:cameraPicker animated:YES completion:nil];
|
[self.viewController presentViewController:cameraPicker animated:YES completion:nil];
|
||||||
} else {
|
} else {
|
||||||
|
// deprecated as of iOS >= 6.0
|
||||||
[self.viewController presentModalViewController:cameraPicker animated:YES];
|
[self.viewController presentModalViewController:cameraPicker animated:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user