Objective-C Language Deleting Elements


Example

Remove at specific index:

[myColors removeObjectAtIndex: 3];

Remove the first instance of a specific object:

[myColors removeObject: @"Red"];

Remove all instances of a specific object:

[myColors removeObjectIdenticalTo: @"Red"];

Remove all objects:

[myColors removeAllObjects];

Remove last object:

[myColors removeLastObject];