-2

I am loading image in table view cell asynchronously It's working perfectly fine but when i scroll down the image is flickering...

import "UIImageView+WebCache.h"

[cell.imgProfilePic sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",[arrSearchedPic objectAtIndex:indexPath.row]]] placeholderImage:[UIImage imageNamed:@"placeholder.png"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { NSLog(@"download completed..."); }];

user this code as well still image flicker is there anything which i am missing please let me know

any help will be appreciable. Thank you

Community
  • 1
  • 1
objectiveCoder
  • 579
  • 5
  • 17
  • 1
    possible duplicate of [\[self.tableview reloadData\]; causes flickering](http://stackoverflow.com/questions/23312197/self-tableview-reloaddata-causes-flickering) – Kalle Jul 07 '15 at 07:25

2 Answers2

2

Use SDWebImage for load asynchronously image Use this link

https://github.com/rs/SDWebImage

Kishore Suthar
  • 2,943
  • 4
  • 26
  • 44
0

https://github.com/rs/SDWebImage download the library ..add files in the folder add all the files from SDWebImage folder into your project and import this file #import "UIImageView+WebCache.h" the add this to you cellforRow at index path method [cell.imgProfileImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",[profileImage objectAtIndex:indexPath.row]]] placeholderImage:[UIImage imageNamed:@"unchecked.png"] options:SDWebImageRefreshCached];

cell.imgprofileImage will be you imageview in which you want to load the data..

objectiveCoder
  • 579
  • 5
  • 17