I've implemented an UICollectionView with a custom layout. I know how to present visual adornments for the entire collection view, but don't know how to present different image for every section. I need to get the instance of decoration view by indexPath. I found this on Apple Document:
Use this method to create a layout attributes object for a decoration view in the collection view. Decoration views are a type of supplementary view but do not present data that is managed by the collection view’s data source. Instead, they mostly present visual adornments for a section or for the entire collection view.
It is up to you to decide how to use the indexPath parameter to identify a given decoration view. Typically, you use the decorationViewKind parameter to identify the type of the decoration view and the indexPath information to distinguish between different instances of that view.
who can tell me how to do it in detail?
thanks a lot!