Creates and returns a layout attributes object that represents the specified supplementary view.
- iOS 6.0+
- tvOS 9.0+
A string that identifies the type of supplementary view.
The index path of the view.
A new layout attributes object whose precise type matches the type of the class used to call this method.
Use this method to create a layout attributes object for a supplementary view in the collection view. Like cells, supplementary views present data that is managed by the collection view’s data source. But unlike cells, supplementary views are typically designed for a special purpose. For example, header and footer views are laid out differently than cells and can be provided for individual sections or for the collection view as a whole.
It is up to you to decide how to use the
index parameter to identify a given supplementary view. Typically, you use the
element parameter to identify the type of the supplementary view and the
index information to distinguish between different instances of that view.