Instance Method

removeItemsAtIndexes:inParent:withAnimation:

Removes items at the given indexes in the given parent with the specified optional animations.

Declaration

- (void)removeItemsAtIndexes:(NSIndexSet *)indexes inParent:(id)parent withAnimation:(NSTableViewAnimationOptions)animationOptions;

Parameters

indexes

Indexes of the items to be removed.

parent

The parent of the items to be removed.

animationOptions

Animated slide effects used when removing items.

Discussion

This method parallels the removeRowsAtIndexes:withAnimation: method of NSTableView and is used in a way similar to the removeObjectsAtIndexes: method of NSMutableArray. The method does nothing if parent is not expanded. If any of the child items is expanded, then all of its child rows are also be removed.

You can call this method multiple times within the same beginUpdates/endUpdates block; changes work just like modifying an array. Removing an item at an index beyond what is available throws an exception.

See Also

Manipulating Items

- insertItemsAtIndexes:inParent:withAnimation:

Inserts new items at the given indexes in the given parent with the specified optional animations.

- moveItemAtIndex:inParent:toIndex:inParent:

Moves an item at a given index in the given parent to a new index in a new parent.