I\'m using SDWebView image and i want to show an Activity Indicator as placeholder, while fetching the image from remote.
I tried Malek\'s answer here How to show an act
My list is quite lag when the user scrolling the list up and down repeatedly. I found out that the activityindicator had been added infinitely when the cellForItemAtIndexPath is being repeatedly called.
To solve this, add a tag at your activityindicator:
activityIndicator.tag = 9999;
Before the UIActivityIndicator is being created, add these lines to remove the previous activityindicator before adding the new one:
UIView* toDeleteLoader = [cell viewWithTag:9999];
if(toDeleteLoader != nil){
[toDeleteLoader removeFromSuperview];
}
Note: tag content can be any numbers that it won't be used in your cell.