Gives the delegate an opportunity to customize the content offset for layout changes and animated updates.
- iOS 9.0+
- tvOS 9.0+
The collection view making the request.
The proposed point (in the coordinate space of the collection view’s content view) for the upper-left corner of the visible content. This represents the point that the collection view has calculated as the most likely value to use for the animations or layout update.
The content offset that you want to use instead. If you do not implement this method, the collection view uses the value in the
During layout updates, or when transitioning between layouts, the collection view calls this method to give you the opportunity to change the proposed content offset to use at the end of the animation. You might return a new value if the layout or animations might cause items to be positioned in a way that is not optimal for your design.
This method is called after the layout object’s
target method. Implement this method in situations where you do not want to subclass your layout object to modify the content offset.