Contents

addRow()

Adds a new row of cells below the last row.

Declaration

func addRow()

Discussion

New cells are created as needed with makeCell(atRow:column:). This method raises an NSRangeException if there are 0 rows or 0 columns. Use renewRows(_:columns:) to add new cells to an empty matrix.

If the number of rows or columns in the receiver has been changed with renewRows(_:columns:), then new cells are created only if they are needed. This fact allows you to grow and shrink an NSMatrix without repeatedly creating and freeing the cells.

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

Related Documentation

Laying Out the Cells of the Matrix