警告提示框

UIAlertController * alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];

UIAlertAction * action1 = [UIAlertAction actionWithTitle:@"找回密码" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

SecondViewController * sec = [[SecondViewController alloc] init];

[self.navigationController pushViewController:sec animated:YES];

}];

[alert addAction:action1];

UIAlertAction * action2 = [UIAlertAction actionWithTitle:@"短信验证登录" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

}];

[alert addAction:action2];

UIAlertAction * action3 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {

}];

[alert addAction:action3];

[self presentViewController:alert animated:YES completion:^{

}];


// 点击空白键盘消失- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent *)event

{

[tf1 resignFirstResponder];

[tf2 resignFirstResponder];

}

你可能感兴趣的:(警告提示框)