UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"请在iPhone的“设置”-“隐私”-“相机”功能中,找到“XXXXXX”打开相机访问权限" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *ok = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { }]; // 将UIAlertAction添加到UIAlertController中 [alertController addAction:ok]; // present显示 [self presentViewController:alertController animated:YES completion:nil];
log:
pushViewController:animated: called on <NavigationViewController 0x12c081a00> while an existing transition or presentation is occurring; the navigation stack will not be updated.
不知道怎么把这个log去掉。。。