码迷,mamicode.com
首页 > 移动开发 > 详细

【iOS】UIAlertView 点击跳转事件

时间:2015-11-01 17:52:32      阅读:1099      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!