Post

Replies

Boosts

Views

Activity

Reply to UICollectionView scrollToItem broken on iOS14
Hi All Where we have to put this code? self.collectionView.isPagingEnabled = false self.collectionView.scrollToItem(at: indexPath, at: .left, animated: false) self.collectionView.isPagingEnabled = true In my scenario, Let's suppose there are 5 items to show in Collection View Horizontally and we navigate to another screen, where we make some setting change. Due to this server response will change. When we come back on Collection View Screen and make api call for getting updated data but collection views are not updating. It's show old cell and due to this app gets crash, because we are getting updated data from server. I called colletionview.reloadData() when get response from server and inside collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) method getting indexPath.row value old one and not updated. This problem is only on iOS 14.5 version. On old versions app working fine. Thanks Gaurav
May ’21