My JSON response has many data including images what i want is to show the texts ( because it's downloaded so fast ) and in the background the images download and appear when it complete
here is my code to handle the image in my cell in cellForRowAt func
if let imgeArray = self.myResponse[indexPath.row]["photos"] as? [[String:Any]] {
if let photoUrl = imgeArray[0]["Url"] as? String {
if let url = NSURL(string: "https:serverName/Pics/\(photoUrl)"){
if let data = NSData(contentsOf: url as URL) {
cell?.Image.contentMode = .scaleAspectFit
cell?.Image.image = UIImage(data: data as Data)
}
}
}
}
it works fine but takes time any help ?