Initializes and returns a newly allocated collection view object with the specified frame and layout.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The frame rectangle for the collection view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This frame is passed to the superclass during initialization.
The layout object to use for organizing items. The collection view stores a strong reference to the specified object. Must not be
An initialized collection view object or
nil if the object could not be created.
Use this method when initializing a collection view object programmatically.
This method is the designated initializer.