Changes the collection view’s layout and notifies you when the animations complete.
- iOS 7.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The new layout object for the collection view.
trueif you want to animate changes from the current layout to the new layout specified by the
falseto make the change without animations.
The block that is executed when the layout transition finishes or is aborted by the user. This block takes the following parameter:
A Boolean indicating whether the transition completed successfully. This parameter is
trueif the transition finished and the new layout is installed. It is
falseif the user aborted the transition and returned to the old layout.
This method initiates a layout change programmatically, notifying you when the transition is complete. If you choose to animate the layout change, the animation timing and parameters are controlled by the collection view.