UIAlertView

时间:2015-04-06 18:57:23   收藏:0   阅读:226

- (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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!