Instance Property

maxItemSize

The maximum size (in points) of items in the collection view grid.

Declaration

var maxItemSize: NSSize { get set }

Discussion

Setting the size to (0, 0) means that there is no maximum grid size. The default value of this property is (0, 0). If an item’s view is resizable, set the value to the maximum size that the view should use.

See Also

Legacy Collection View Support

var itemPrototype: NSCollectionViewItem?

The receiver’s collection view item prototype.

Deprecated
func newItem(forRepresentedObject: Any) -> NSCollectionViewItem

Returns the collection view item that is used for the specified object.

Deprecated
var selectionIndexes: IndexSet

The indexes of the currently selected items.

var maxNumberOfRows: Int

The maximum number of rows that the collection view displays.

Deprecated
var maxNumberOfColumns: Int

The maximum number of columns that the collection view displays.

Deprecated
var minItemSize: NSSize

The minimum size (in points) of items in the collection view grid.

Deprecated
func item(at: Int) -> NSCollectionViewItem?

Returns the collection view item for the represented object at the specified index.

func frameForItem(at: Int) -> NSRect

Returns the frame of the collection view item at the specified index.

func frameForItem(at: Int, withNumberOfItems: Int) -> NSRect

Returns the frame of an item based on the number of items in the collection view.

func draggingImageForItems(at: IndexSet, with: NSEvent, offset: NSPointPointer) -> NSImage

This method computes and returns an image to use for dragging.