initWithObjects:
Initializes a newly allocated array by placing in it the objects in the argument list.
Declaration
- (instancetype) initWithObjects:(ObjectType) firstObj;Parameters
- firstObj:
The first object for the array.
Return Value
An array initialized to include the objects in the argument list. The returned object might be different than the original receiver.
Discussion
Pass comma-separated list of trailing variadic arguments as additional objects, ending with nil.
After an immutable array has been initialized in this way, it can’t be modified.
This method is a designated initializer.