Returns a counted set object initialized with enough memory to hold a given number of objects.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The initial capacity of the new counted set.
A counted set object initialized with enough memory to hold
The method is the designated initializer for
Note that the capacity is simply a hint to help initial memory allocation—the initial count of the object is
0, and the set still grows and shrinks as you add and remove objects. The hint is typically useful if the set will become large.