-
Notifications
You must be signed in to change notification settings - Fork 1.9k
iOS CollectionView doesn't respect a change to ItemsLayout when using Items2.CollectionViewHandler2 #31259
Copy link
Copy link
Closed
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewcollectionview-cv2i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.Current heighest priority issues that we are targeting for a release.platform/ioss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewcollectionview-cv2i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.Current heighest priority issues that we are targeting for a release.platform/ioss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Description
When using the regular CollectionView on iOS, my app could change its ItemsLayout at runtime and so re-layout all the UI in response to a change in screen orientation. Due to the CollectionView layout apparently not working as expected on iPhone 16, I moved to use Items2.CollectionViewHandler2. By doing that, the layout problems went away on iPhone 16. However, I then found an attempt to change its ItemsLayout at runtime no longer works. This means when the user rotates their devices, my app now has to tell the user to restart the app.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/gbarkerz/ItemsLayoutChangeSample
Version with bug
9.0.100 SR10
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
ios 18.5.9214/9.0.100 SDK 9.0.300, VS 17.14.36408.4
Did you find any workaround?
I have no workaround, as I can't revert to not using Items2.CollectionViewHandler2, as the regular CollectionView presents broken layout with the iPhone 16 simulator.
Relevant log output