Creating an NSCache for the first time with CloudKit Records - close?
I have a project I'm close to completing. My last problem arises when I've downloaded CloudKit records to an array to be displayed in a tableview. Here is my code for the query portion of the controller. for result in results! { let tablerestaurant = Restaurant() if let name = result.value(forKey: "Name") as! String? { tablerestaurant.name = name } // Do same for image if let imageAsset = result.object(forKey: "Picture") as! CKAsset? { if let data = try? Data(contentsOf: imageAsset.fileURL) { tablerestaurant.image = UIImage(data: data) } } self.tablerestaurantarray.append(tablerestaurant) //