1.UIAlertView
首先来看下UIAlertView的实现效果图:
第一步通过点击外部按钮弹出提醒对话框
第二步实现对两个按钮点击事件的响应
2.UIActionSheet
首先来看下UIActionSheet实现的效果图
第一步给外部的按钮增加点击事件弹出操作表
第二步监听各个按钮点击事件
注:以上两个控件在监听内部按钮点击响应事件时,都需要添加代理协议:
风云正 ©著作权
文章标签 ios UIAlertView UIActionSheet #pragma 按钮点击事件 文章分类 HarmonyOS 后端开发
1.UIAlertView
首先来看下UIAlertView的实现效果图:
第一步通过点击外部按钮弹出提醒对话框
第二步实现对两个按钮点击事件的响应
2.UIActionSheet
首先来看下UIActionSheet实现的效果图
第一步给外部的按钮增加点击事件弹出操作表
第二步监听各个按钮点击事件
注:以上两个控件在监听内部按钮点击响应事件时,都需要添加代理协议:
下一篇:ios键盘收起的常见方法
UIActionSheet与UIAlertView
感谢关注 Ithao123iOS频道
IOS8后虽然出了新的控制器UIAlertController,但之前的UIAlertView,UIActionSheet依然可以使用。
一、UILabe
本文遵循“署名-非商业用途-保持一致”创作公用协议转载请保留此句:太阳火神的漂亮人生 - 本博客专注于 敏捷开发及移动和物联设备研究:
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M