NSSet declares the programmatic interface for static sets of distinct objects.Available in OS X v10.0 and later which is inherited from NSObject
NSSet declares the programmatic interface for static sets of distinct objects. You establish a static set’s entries when it’s created, and thereafter the entries can’t be modified.
NSSet is "toll-free bridged" with its Core Foundation counterpart, CFSetRef
. See "Toll-Free Bridging" for more information on toll-free bridging.
You can use sets as an alternative to arrays when the order of elements isn’t important and performance in testing whether an object is contained in the set is a consideration—while arrays are ordered, testing for membership is slower than with sets.
The question related to this can be tagged with nsset , objective-c , ios tags
Creating Sets
NSSet *setObjs = [NSSet setWithObjects:@"Chrysler",
@"Ford",
@"General Motors", nil];