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];