CocoaDev

Edit AllPages

People have expressed their desire for greater functionality from NSSet. Anyone who wants to write a few of the methods (or improve existing methods) should feel more than welcome.

At least one person has said they want:

*- (NSSet *)intersectionWithSet:(NSSet *)aSet; *- (NSSet *)setByAddingSet:(NSSet *)aSet; *- (NSSet *)setByRemovingSet:(NSSet *)aSet; *- (NSSet *)setByAddingObject:(id)anObject; *- (NSSet *)setByRemovingObject:(id)anObject;


NSSet category CocoaDevUsersAdditions:

NSSet+CocoaDevUsersAdditions.h

#import <Foundation/Foundation.h>

@interface NSSet (CocoaDevUsersAdditions)

// NOTE: results set contains instance of NSNull if result of performing selector with some object is nil

@end

NSSet+CocoaDevUsersAdditions.m

#import “NSSet+CocoaDevUsersAdditions.h”

@implementation NSSet (CocoaDevUsersAdditions)


[[Category:CocoaDevUsersAdditions