Potential strong cycle fixed.
This commit is contained in:
parent
ee9af6406c
commit
c77652755a
|
@ -34,12 +34,13 @@
|
|||
if (self.imageURL)
|
||||
{
|
||||
__block UIActivityIndicatorView *activityIndicator;
|
||||
__weak UIImageView *weakImageView = self.imageView;
|
||||
[self.imageView setImageWithURL:self.imageURL placeholderImage:nil options:SDWebImageProgressiveDownload progress:^(NSUInteger receivedSize, long long expectedSize)
|
||||
{
|
||||
if (!activityIndicator)
|
||||
{
|
||||
[self.imageView addSubview:activityIndicator = [UIActivityIndicatorView.alloc initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]];
|
||||
activityIndicator.center = self.imageView.center;
|
||||
[weakImageView addSubview:activityIndicator = [UIActivityIndicatorView.alloc initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]];
|
||||
activityIndicator.center = weakImageView.center;
|
||||
[activityIndicator startAnimating];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue