美文网首页
弹出取消和确认按钮

弹出取消和确认按钮

作者: 芥子劫 | 来源:发表于2016-07-14 09:54 被阅读0次

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"是否删除" message:@"" preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"删除" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

NSLog(@"删除");

}];

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

NSLog(@"取消");

}];

[alertController addAction:cancelAction];

[alertController addAction:otherAction];

[self presentViewController:alertController animated:YES completion:nil];

相关文章

  • 弹出取消和确认按钮

    UIAlertController *alertController = [UIAlertController a...

  • vue 异步请求

    一、无参异步请求假设有这么一个场景:点击一个submit按钮,弹出对话框:确认/取消,点击确认,根据mock接口返...

  • 【C#与.net】7.0 MessageBox消息提示框

    1.0基本用法 创建一个按钮,增加弹出消息方法。效果如下: 进一步完善: 还可以带标记: 用户点击确认或者取消,怎...

  • JavaScript 认识2 三种弹框方式

    HTML 有三种基本弹框方式 alert:只有一个确认按钮confirm:俩个按钮,一个确认按钮,一个取消按钮pr...

  • antd使用

    antd button按钮点击事件弹出弹框,弹框点击取消关闭,button按钮奇怪的带有focus样式

  • element-ui常用组件

    // 顶部图标按钮组件 // 顶部图标按钮点击下拉 // 顶部图片下拉后样式 // 单击弹出确认框 // 引入左边...

  • 弹窗确认

    弹窗确认 需求: 点击删除,弹出确认信息,选择确定后删除,取消后不采取任何操作

  • 提示框

    确认框 确认框通常用于验证是否接受用户操作。当确认卡弹出时,用户可以点击 "确认" 或者 "取消" 来确定用户操作...

  • Semantic 弹窗提示

    两种类型 有“确认”和“取消”按钮的对话框弹窗,用来对用户的操作进行确认,如下图: 对应插件:ui-dialog;...

  • 随手笔记

    弹出提示窗口时,点击了'取消'按钮 if MessageBox("提示","是否修改船期日期?",questi...

网友评论

      本文标题:弹出取消和确认按钮

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