NSCollection protocol defines methods for providing layout information to an
NSCollection object. Implement the methods of this protocol when you want to customize the layout behavior and perhaps return different values for different items or sections.
- macOS 10.11+
All of the methods in this protocol are optional, so you can implement only the methods you need to achieve the desired layout. If you do not implement a particular method, the flow layout object obtains default values from its own properties and applies them uniformly. Implement your methods in the object you assign to the
delegate property of the collection view itself.