Use the activity indicator With ASIHTTPrequest

只谈情不闲聊 提交于 2019-12-08 10:58:14

问题


i'm using ASIHTTPRequest in asynchrone mode and i want to show an Activity Indicator . In they website they say :

Disabling automatic updates to the network activity indicator (iOS only)

By default, ASIHTTPRequests will show the network activity indicator (in the status bar) on iOS devices when requests are using the network. If you prefer to manage this yourself, you can disable these updates:

[ASIHTTPRequest setShouldUpdateNetworkActivityIndicator:NO];

But i dont wan't to show it in statuts bar , i disabled the statuts bar in my app . I want to show it in my interface . Some one have an idea ?

Edit : @alex Reynolds, i read and trie it but my progress bar Still blanc and when finished he become blue directly , he don't progresse .Note that the download take 10 seconde . He still blanc 10 second and then become blue . this is my code

NSURL *url =[NSURL URLWithString:myURLString];
    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    [request setDownloadProgressDelegate:myProgressView];
    [request setDelegate:self];
    [request startAsynchronous];

myProgressView is UIProgressView


回答1:


The ASIHTTPRequest documentation has a section on tracking progress of requests.



来源:https://stackoverflow.com/questions/6065696/use-the-activity-indicator-with-asihttprequest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!