您的位置:首页 > 产品设计 > UI/UE

【iOS】UIAlertView 点击跳转事件

2015-11-01 16:53 495 查看
iOS 开发中,UIAlertView 经常用到。这里记录下曾用到的点击跳转事件。

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"
message:@"退出"
delegate:self
cancelButtonTitle:@"确认"
otherButtonTitles:nil];
if ([@"请记住新密码" isEqualToString:result.msg]) {
alert.tag=1;
}
[alert show];


UIAlertView 的点击事件(点击后跳转到其他页面):

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (alertView.tag == 1) {
[self.navigationController popViewControllerAnimated:YES];
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: