Instance Method

removeObjectsFromIndices:numIndices:

Removes the specified number of objects from the array, beginning at the specified index.

Declaration

- (void)removeObjectsFromIndices:(NSUInteger *)indices numIndices:(NSUInteger)cnt;

Parameters

indices

A C array of the indices of the objects to remove from the receiving array.

count

The number of objects to remove from the receiving array.

Discussion

This method is similar to removeObjectAtIndex:, but it allows you to efficiently remove multiple objects with a single operation. If you sort the list of indexes in ascending order, you will improve the speed of this operation.

This method cannot be sent to a remote object with distributed objects.

Special Considerations

This deprecated method uses a C array of indices. The removeObjectsAtIndexes: method uses an NSIndexSet which provides a more efficient way of indexing into an array.

See Also

Removing Objects

- removeAllObjects

Empties the array of all its elements.

- removeLastObject

Removes the object with the highest-valued index in the array

- removeObject:

Removes all occurrences in the array of a given object.

- removeObject:inRange:

Removes all occurrences within a specified range in the array of a given object.

- removeObjectAtIndex:

Removes the object at index .

- removeObjectsAtIndexes:

Removes the objects at the specified indexes from the array.

- removeObjectIdenticalTo:

Removes all occurrences of a given object in the array.

- removeObjectIdenticalTo:inRange:

Removes all occurrences of anObject within the specified range in the array.

- removeObjectsInArray:

Removes from the receiving array the objects in another given array.

- removeObjectsInRange:

Removes from the array each of the objects within a given range.