警告提示框

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

}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容