![](https://camo.githubusercontent.com/89638d72b225d9ded9b4cae17e617e63f1c1c1a3913bf65789173992e5bac082/68747470733a2f2f7777342e73696e61696d672e636e2f6c617267652f303036744e6252776c79316664613133357669716c67333038323065627775712e676966)
CKAlertViewController *alertVC = [CKAlertViewController alertControllerWithTitle:@"Access Microphone?" message:@"Are you sure that you want to allow this app to access your microphone?" ];
CKAlertAction *cancel = [CKAlertAction actionWithTitle:@"取消" handler:^(CKAlertAction *action) {
NSLog(@"点击了 %@ 按钮",action.title);
}];
CKAlertAction *sure = [CKAlertAction actionWithTitle:@"确定" handler:^(CKAlertAction *action) {
NSLog(@"点击了 %@ 按钮",action.title);
}];
[alertVC addAction:cancel];
[alertVC addAction:sure];
[self presentViewController:alertVC animated:NO completion:nil];