CollectionViewCell image doesn't display until scrolling
问题 I am using this code to display image in to my customCell. This is my code to fetch image from API. It was working fine as per the given link. But the problem started when I added this code to my cellForItemAt indexPath: for image Cache. func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { // Displaying other elements with text customCell.mainImage.image = nil var image1 = self.imageCache.object(forKey: indexPath.item as