removeRows(at:withAnimation:)
Removes the rows using the specified animation.
Declaration
func removeRows(at indexes: IndexSet, withAnimation animationOptions: NSTableView.AnimationOptions = [])Parameters
- indexes:
An index set containing the rows to remove.
- animationOptions:
The animation displayed during the insert. See Animationoptions for the possible values that can be combined using the C bitwise OR operator.
Discussion
This method deletes from the table the rows represented at indexes and automatically decreases numberOfRows by the count of indexes.
The row indexes should be with respect to the current state displayed in the table view, and not the final state, because the specified rows do not exist in the final state.
Calling this method multiple times within the same beginUpdates() and endUpdates() block is allowed, and changes are processed incrementally.
Changes are processed incrementally as the insertRows(at:withAnimation:), removeRows(at:withAnimation:), and the moveRow(at:to:) methods are called. It is acceptable to delete row 0 multiple times, as long as there is still a row available.