问题描述
else {
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",nil)
message:NSLocalizedString(@"Camera not available.",nil)
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK",nil)
otherButtonTitles:nil] show];
self.result(nil);
self.result = nil;
_arguments = nil;
}
}
我收到此错误,我尝试将 'UIAlertView'
更改为 'UIAlertController'
仍然收到不同的错误。
解决方法
您可以在 xCode 构建中使用以下 UIAlertController
替换:
UIAlertController *alert = [UIAlertController
alertControllerWithTitle:@"Error" message:@"Camera not available"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *ok = [UIAlertAction actionWithTitle:@"Ok" style: style:UIAlertActionStyleDefault handler:nil];
[alert addAction:ok];
[self presentViewController:alert animated:YES completion:nil];