I am using AFNetworking to download images from server , everything works fine but images wont't be appear unless I scroll table view . here is my code :
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell*cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
//configuring news feed
dictionary = [newsFeed objectAtIndex:indexPath.row];
//display thumbnails
UIImageView *image = [[UIImageView alloc]init];
[image setImageWithURL:[NSURL URLWithString:[dictionary objectForKey:@"image"]]placeholderImage:[UIImage imageNamed:NEWSAVATAR]];
cell.imageView.image = [image.image imageScaledToSize:CGSizeMake(55, 55)];
[cell setNeedsLayout];
return cell;
}