The last object in the array.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
@property(nonatomic, readonly) Object Type lastObject;
Discussion
If the array is empty, returns nil
.
The last object in the array.
SDKs
Framework
@property(nonatomic, readonly) Object Type lastObject;
If the array is empty, returns nil
.
- contains Object:
Returns a Boolean value that indicates whether a given object is present in the array.
count
The number of objects in the array.
- get Objects: range:
Copies the objects contained in the array that fall within the specified range to a
.
first Object
The first object in the array.
- object At Index:
Returns the object located at the specified index.
- object At Indexed Subscript:
Returns the object at the specified index.
- objects At Indexes:
Returns an array containing the objects in the array at the indexes specified by a given index set.
- object Enumerator
Returns an enumerator object that lets you access each object in the array.
- reverse Object Enumerator
Returns an enumerator object that lets you access each object in the array, in reverse order.