1

I am showing a title, description, url and images, when I am displaying in uitableview cell the images are displaying twice. Also images of Scrape URL are taking much time to load.

Can any one guide how can I fix this?

I have detected Scrape URL using : SwiftLinkPreview

VC.One
  • 14,790
  • 4
  • 25
  • 57
Uma Madhavi
  • 4,851
  • 5
  • 38
  • 73

1 Answers1

1

The image loading/Downloading data from web should in Asynchronous mode. So that our UI element doesn't have an impact. And for displaying twice use effectively for Reuse identifier. For downloading you can follow below thread.

Swift async load image

Community
  • 1
  • 1
B25Dec
  • 2,301
  • 5
  • 31
  • 54
  • Thank u .. I am using Asynchronous mode only. But sometimes , the tableview not at all scrolling, until the image appears. – Uma Madhavi Nov 17 '16 at 11:33
  • This is due to not using the Async mode. due to which if your app is loading data from web server your UI will be freeze until its download the data from server. – B25Dec Nov 17 '16 at 11:34
  • For most of the images i am using AlamofireImage for downloading and i am storing in nscache but for Scrape URL i am using http://stackoverflow.com/a/37019507/5362916 this link for loading image. – Uma Madhavi Nov 17 '16 at 11:45