美文网首页
警告提示框

警告提示框

作者: 法库德 | 来源:发表于2017-10-25 14:09 被阅读0次

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

    }

    相关文章

      网友评论

          本文标题:警告提示框

          本文链接:https://www.haomeiwen.com/subject/rveqpxtx.html