I am encountering a strange behaviour in the way iOS14 handles a CollectionView. I have noticed that (changing from iOS13.5 to iOS14) the order in which the UICollectionViewCells are displayed is wrong. The pictures below are screenshot from exactly the same code (in xCode12), the only difference is that the correct ones are with a build for iOS13.5 and from a simulator with an iPhone 11 on iOS13.5, while the wrong ones are with a build for iOS14 and from a simulator with an iPhone 11 on iOS14. Everything else (code, settings, etc) is exactly the same:
Picture 1, how the collection should display (correct in iOS13.5):
If the same code is built with iOS14 and run on the same iPhone simulator with iOS14, the result is the following (not the order is wrong: it is reversed):
In the datasource (which is an array with the labels) all is correct and the cellForItemAt delegate works correctly.
There is definitely something being handled differently in iOS14. One last example is another screenshot where the sizes of the boxes are different (depending on the length of the labels):
Correct (building for iOS13.5) is:
While building for iOS14 yields the following:
Again, the code is exactly the same, I am just building the project for different iOS versions. It seems to me there may be a bug somewhere in the way collections have been modified for iOS14. Any help or thought would be welcome.