Instance Method

initWithArray:

Returns a counted set object initialized with the contents of a given array.

Declaration

- (instancetype)initWithArray:(NSArray<ObjectType> *)array;

Parameters

anArray

An array of objects to add to the new set.

Return Value

An initialized counted set object with the contents of anArray. The returned object might be different than the original receiver.

See Also

Initializing a Counted Set

- initWithSet:

Returns a counted set object initialized with the contents of a given set.

- initWithCapacity:

Returns a counted set object initialized with enough memory to hold a given number of objects.