NSSet -member to check equality of NSValue
问题 I have a NSSet containing many thousands of NSValue objects (wrapping CGPoints ). I would like to very quickly find if a given CGPoint value exists in the NSSet . It seems to me that the member: method of an NSSet might do the job here, except that it checks for equality using isEqual: . NSValue objects use isEqualToValue: , and so when I execute the code: [mySet member:valueToCheck]; it actually causes Xcode to crash. 1) Is there some way to use a custom equality check to make this work for