Contents

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

Initializes and returns a newly allocated matrix of the specified size using the given cell as a prototype.

Declaration

init(frame frameRect: NSRect, mode: NSMatrix.Mode, prototype cell: NSCell, 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.

  • cell:

    An instance of a subclass of Nscell, which the new matrix copies when it creates new cells.

  • rowsHigh:

    The number of rows in the matrix.

  • colsWide:

    The number of columns in the matrix.

Discussion

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

See Also

Initializing an NSMatrix Object