Instance Method

initWithSet:

Initializes a newly allocated set and adds to it objects from another given set.

Declaration

- (instancetype)initWithSet:(NSSet<ObjectType> *)set;

Parameters

set

A set containing objects to add to the receiving set. Each object is retained as it is added.

Return Value

An initialized objects set containing the objects from set. The returned set might be different than the original receiver.

See Also

Initializing a Set

- initWithArray:

Initializes a newly allocated set with the objects that are contained in a given array.

- initWithObjects:

Initializes a newly allocated set with members taken from the specified list of objects.

- initWithObjects:count:

Initializes a newly allocated set with a specified number of objects from a given C array of objects.

- initWithSet:copyItems:

Initializes a newly allocated set and adds to it members of another given set.

- init

Initializes a newly allocated set.