多个警告弹出框 按钮冲突 和 确认点击事件
作者:
来敲代码 | 来源:发表于
2017-08-10 13:53 被阅读6次 [super viewDidLoad];
UIAlertView *actionView1 = [[UIAlertView alloc]initWithTitle:nil message:@"如果您不选择此项服务,发生事故后,您将承担保险理赔范围内不超过1500元的维修费用。" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
// 这里给弹出框 做标记 用来区分如果多个弹出框 处理代理方法的按钮点击事件
actionView1.tag = 666;
[actionView1 show];
}
#pragma mark - alertView
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if(alertView.tag == 666)
{
if (buttonIndex == 1)
{
// 这里做你点确认 需要做的事情
}
}
}
本文标题:多个警告弹出框 按钮冲突 和 确认点击事件
本文链接:https://www.haomeiwen.com/subject/pvdhrxtx.html
网友评论