Instance Method

objectAtIndex:

Returns the object located at the specified index.

Declaration

- (ObjectType)objectAtIndex:(NSUInteger)index;

Parameters

index

An index within the bounds of the array.

Return Value

The object located at index.

Discussion

If index is beyond the end of the array (that is, if index is greater than or equal to the value returned by count), an NSRangeException is raised.

See Also

Querying an Array

- containsObject:

Returns a Boolean value that indicates whether a given object is present in the array.

count

The number of objects in the array.

- getObjects:

Copies all the objects contained in the array to aBuffer.

Deprecated
- getObjects:range:

Copies the objects contained in the array that fall within the specified range to aBuffer.

firstObject

The first object in the array.

lastObject

The last object in the array.

- objectAtIndexedSubscript:

Returns the object at the specified index.

- objectsAtIndexes:

Returns an array containing the objects in the array at the indexes specified by a given index set.

- objectEnumerator

Returns an enumerator object that lets you access each object in the array.

- reverseObjectEnumerator

Returns an enumerator object that lets you access each object in the array, in reverse order.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software