标签:弹出对话框
- (IBAction)backAction:(UIBarButtonItem *)sender {
UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:@"提示" message:@"你确定放弃添加吗" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
[alertview show];
}
#pragma mark alertview
//UIAlertView协议中的方法
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
switch (buttonIndex) {
case 0:
break;
case 1:
[self dismissViewControllerAnimated:YES completion:nil];
break;
default:
break;
}
}
标签:弹出对话框
原文地址:http://9692896.blog.51cto.com/9682896/1629195