首页 > 移动平台 > 详细

【iOS】UIAlertView 点击跳转事件

时间:2015-11-01 17:51:25      阅读:314      评论:0      收藏:0      [点我收藏+]

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];
    }
}

 

【iOS】UIAlertView 点击跳转事件

原文:http://www.cnblogs.com/jaxer/p/4928160.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!