アニメーションを作成するために一連の画像をダウンロードしています。ダウンロードが開始されたときにアクティビティ インジケーターを表示し、終了したときにアクティビティ インジケーターを非表示にするにはどうすればよいですか。
self.img = [[UIImageView alloc] initWithFrame:CGRectMake(0, 65, self.view.frame.size.width, self.view.frame.size.width-70)];
img.animationImages = [NSArray arrayWithObjects:
[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"URL"]]],
[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"URL"]]],
[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"URL"]]],
[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"URL"]]],
img.animationDuration = 20.0f;
img.animationRepeatCount = 0;
[img startAnimating];
[self.view addSubview: img];