The content is distinct on all the cells on the first page but as we scroll down, only the UIImageView
is repeated though the UILabel
s are distinct.
I am using [UIImageView setImageWithURL:(NSURL *)url]
from AFNetworking
which was included in the RestKit
. Heres the implementation
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
RClubTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"RClubTableViewCell"];
RClubObject * club = _clubs[indexPath.row];
[cell.clubImageView setImageWithURL:[NSURL URLWithString:club.clubImageURL]];
cell.nameLabel.text = club.clubName;
return cell;
}
Seems like iOS
is somehow using the previously created cells. Would like to have completely fresh cells while scrolling.
You need to call
setImageWithURL:placeholderImage:
with a non-nil placeholder image to have the old image removed from the image view.