Instance Property

firstObject

The first object in the fetch result.

Declaration

@property(nonatomic, readonly) ObjectType firstObject;

Discussion

You specify the ordering of a fetch result in the PHFetchOptions object you pass to a fetch method.

Returns nil if the fetch result is empty.

See Also

Querying a Fetch Result

- containsObject:

Returns whether the specified object is present in the fetch result.

count

The number of objects in the fetch result.

- countOfAssetsWithMediaType:

Returns the number of assets in the fetch result of a specified type.

lastObject

The last object in the fetch result.

- objectAtIndex:

Returns the object located at the specified index.

- objectAtIndexedSubscript:

Returns the object located at the specified index.

- objectsAtIndexes:

Returns an array containing the objects in the fetch result at the indexes in the specified index set.

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