Registers a class to use when creating the layout’s decoration views.
- macOS 10.11+
The class to use for the decoration view. This class must conform to the
nilto unregister a previously registered class or nib file.
The string your layout uses to identify the decoration view’s type. This parameter must not be
niland must not be an empty string.
Call this method as part of your layout object’s initialization and use it to register any decoration views needed for your layout. Decoration views are visual adornments that you include in your layouts and use to present the collection view’s content. For example, you might use decoration views to implement a dynamic background that can expand or shrink to match the current number of items. The layout object defines and owns the decoration views it uses. Decoration views do not have any ties to the collection view’s data source object.
After registering your decoration views, you create decoration views by returning an appropriate set of layout attributes from the
layout method. When you return a
NSCollection object configured for a decoration view, the collection view uses your registered nib or class information to create the corresponding views.