iPhone 14 Pro UICollectionView scrollToItem not working

Faced with a problem, it is played only on iPhone 14 pro. There is a collectionView (isPagingEnabled = true), that will fall horizontally using the scrollToItem method(at: indexpath, at: .centeredHorizontally, animated: true), and at the same time, if the collection is not on the zero cell, it is moved to the zero cell, regardless of the specified indexPath. In this case, the func setContentOffset(_ contentOffset: CGPoint, animated: Bool) method outputs contentOffset = (0, 0). If you count the customPoint and pass it to override func setContentOffset(_ contentOffset: CGPoint, animated: Bool) { super.setContentOffset(customPoint, animated: animated) }, then it works correctly. The problem was detected only on iPhone 14 pro for all supported iOS.

P.S. collectionView.isPagingEnabled = false ... collectionView.isPagingEnabled = true don't work!

I got the same issue! It's super frustrating. ONLY the iPhone 14 PRO. Even the PRO MAX works as intended.

iPhone 14 Pro UICollectionView scrollToItem not working
 
 
Q