2 ooomiao oOOMIAO 于 2013.03.05 15:16 提问

使用SDWebImageDownloader

使用SDWebImageDownloader隐藏和现实activityIndicator。

在每个button加载图片类:

__block UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
activityIndicator.center = mainImage.center;
activityIndicator.hidesWhenStopped = YES;

[activityIndicator startAnimating];
[imgView setImageWithURL:url   placeholderImage:[UIImage imageNamed:@"placeholderLarge.png"] options:0 andResize:CGSizeMake(mainImage1.frame.size.width,imgview.frame.size.height) withContentMode:UIViewContentModeScaleAspectFit];
[imgView addSubview:activityIndicator];

没得到可以在哪移除activityIndicator

1个回答

zj382561388
zj382561388   2015.08.26 14:50
Csdn user default icon
上传中...
上传图片
插入图片