首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ASIHTTPRequest UIProgressView不工作

ASIHTTPRequest UIProgressView不工作
EN

Stack Overflow用户
提问于 2012-02-03 03:38:20
回答 1查看 406关注 0票数 0

我是Xcode新手,对UIProgressView有点问题。我找到了一些代码,但我不太理解它。你能给我解释一下为什么UIProgressView在结束后不关闭吗?

代码语言:javascript
复制
- (IBAction)Download:(id)sender
{
    NSURL *url = [NSURL URLWithString:@"http://db.tt/5WP2pia"];
    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    [request setDelegate:self];
    [request startAsynchronous];
    progressView = [[UIProgressView alloc]
                          initWithFrame:CGRectMake(30.0f, 80.0f, 225.0f, 90.0f)];
    UIAlertView *progressAlert =
            [[UIAlertView alloc] initWithTitle: @"Download..." 
                                       message: @"Please wait..."
                                      delegate: self
                             cancelButtonTitle: nil 
                             otherButtonTitles: nil];
    [progressAlert addSubview:progressView];
    [progressView setProgressViewStyle: UIProgressViewStyleBar];
    [request setDownloadDestinationPath:@"/var/root/osk.rar"];
    [request setDownloadProgressDelegate:progressView];
    [progressAlert show];
    [progressAlert release];
}
EN

回答 1

Stack Overflow用户

发布于 2012-02-04 05:16:53

  1. ASIHTTPRequest完成后,您必须手动关闭警报。使用ASIHTTPRequest

progressView != progressAlert

  • Don't
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9118799

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档