UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"重新登录" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
//点击确定后执行这里面的代码
}]];
[self.navigationController presentViewController:alert animated:YES completion:nil];
//注:completion,顾名思义-->完成,结束,实现。completion参数一般是个代码块Block,完成之后/结束之后/实现之后的代码块;不需要做任何操作可置空nil。
//注:handler也是个代码块