Changes the collection view’s layout and optionally animates the change.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The new layout object for the collection view.
YESif you want to animate changes from the current layout to the new layout specified by the
NOto make the change without animations.
This method makes the layout change without further interaction from the user. If you choose to animate the layout change, the animation timing and parameters are controlled by the collection view.