I'm receiving an error in regards to a UICollectionView that I have not received prior to updating to Xcode 13.2. In the application, I have a view that contains multiple UICollectionViews each one having a different number of cells but all having a cell count over or equal to 3. The issue comes into play when the user selects an item in one of the CollectionViews that is beyond the second item in that specific collectionView. When functioning correctly, upon selection of a cell a new view should appear. The app functions as intended when the user selects either the first or second cell in the collectionView but fails to present the new view and crashes when the user selects any cell beyond that. Here's the error:
Thread 1: "Attempted to scroll the collection view to an out-of-bounds item (5) when there are only 3 items in section 0.
This error is strange for multiple reasons. One being that the collectionView I'm selecting the cell on has 5 items not 3 (which I verify by running: print("\(CollectionView1.numberOfItems(inSection: 0))") which outputs 5), another being that the error only appears upon selection of a cell not when scrolling to a cell like the error suggests, and finally this issue seemed to spontaneously appear upon updating to Xcode 13.2, prior to the update everything was functioning fine.