Class

NSCollectionLayoutGroupCustomItem

An item used in a group with a custom layout arrangement.

Declaration

class NSCollectionLayoutGroupCustomItem : NSObject

Overview

You use a custom item if you want to specify a layout with a custom arrangement, like a radial or diagonal layout. You use custom items within a group that's created with custom(layoutSize:itemProvider:).

Instead of providing a layout size for the custom item, like you do when you create an NSCollectionLayoutItem, you provide a frame instead.

Topics

Creating a Custom Item

init(frame: CGRect)

Creates a custom item with the specified frame.

init(frame: CGRect, zIndex: Int)

Creates a custom item with the specified frame and vertical stacking order in relation to other items in the group.

Getting the Frame

var frame: CGRect

The frame of the custom item.

Specifying Stacking Order

var zIndex: Int

The vertical stacking order of the custom item in relation to other items in the group.

Relationships

Inherits From

See Also

Advanced Layouts

typealias NSCollectionLayoutGroupCustomItemProvider

A closure that creates and returns each of the custom group's items.