i trying to download the picture from URL, and use a activity indicator animating to present the file is downloading, however, it is not working as my indicator wont animating when i call this download function,can somebody tell me why?
-(void)download{
[indicator startAnimating];
NSString *downloadPath=@"http://www.xyz.com/path/pic.jpg;
NSData *downloadData=[NSData dataWithContentsOfURL:[ NSURL URLWithString:downloadPath]];
if(downloadData){
//do something
[indicator stopAnimating];
}
else{
//do something
[indicator stopAnimating];
}
}