Contents

init(frame:mode:cellClass:numberOfRows:numberOfColumns:)

Initializes and returns a newly allocated matrix of the specified size using cells of the given class.

Declaration

init(frame frameRect: NSRect, mode: NSMatrix.Mode, cellClass factoryId: AnyClass?, numberOfRows rowsHigh: Int, numberOfColumns colsWide: Int)

Parameters

  • frameRect:

    The matrix’s frame.

  • mode:

    The tracking mode for the matrix; this can be one of the modes described in Mode Swift.enum.

  • factoryId:

    The class to use for any cells that the matrix creates and uses. This can be obtained by sending a class message to the desired subclass of Nscell.

  • rowsHigh:

    The number of rows in the matrix.

  • colsWide:

    The number of columns in the matrix.

Return Value

The initialized instance of NSMatrix.

Discussion

This method is the designated initializer for matrices that add cells by creating instances of an NSCell subclass.

See Also

Initializing an NSMatrix Object