ios - Saving and retrieving images with correct order -


i'm trying save images array, , name array string below code;

self.countrynamesarray.append(object["countryname"] as! string) let image = uiimage(data:imagedata!) self.countryimages.append(image!) 

but doesn't retrieve images same order saved while retrieve countrynamesarray correct order.

rowstring = countrynamesarray[row] myimageview.image = self.countryimages[row] 

should use custom class save images string or there way fix?


Comments