Contents

addRow(with:)

Adds a new row of cells below the last row, using the specified cells.

Declaration

func addRow(with newCells: [NSCell])

Parameters

  • newCells:

    An array of objects to use to fill the new row, starting with the object at index 0. Each object should be an instance of Nscell or one of its subclasses (usually Nsactioncell). The array should contain a sufficient number of cells to fill the entire row. Extra cells are ignored, unless the matrix is empty. In that case, a matrix is created with one row and enough columns for all the elements of newCells.

Discussion

This method redraws the receiver. Your code may need to send sizeToCells() after sending this method to resize the receiver to fit the newly added cells.

See Also

Laying Out the Cells of the Matrix