Contents

renewRows(_:columns:)

Changes the number of rows and columns in the receiver.

Declaration

func renewRows(_ newRows: Int, columns newCols: Int)

Parameters

  • newRows:

    The new number of rows in the matrix.

  • newCols:

    The new number of columns in the matrix.

Discussion

This method uses the same cells as before, creating new cells only if the new size is larger; it never frees cells. It doesn’t redisplay the receiver. Your code should normally send sizeToCells() after invoking this method to resize the receiver so it fits the changed cell arrangement. This method deselects all cells in the receiver.

See Also

Laying Out the Cells of the Matrix