Can you get this in a simple reproducible case? For example, I just tried:
NSValue *v = [NSValue valueWithCGPoint:CGPointMake(1, 1)]; NSSet *s = [NSSet setWithObject:v]; NSLog(@"%@", [s member:[NSValue valueWithCGPoint:CGPointMake(1, 1)]]);
But everything works fine.
change
-isEqual: no problem:
NSValue *v1 = [NSValue valueWithPoint:NSMakePoint(1, 1)]; NSValue *v2 = [NSValue valueWithPoint:NSMakePoint(1, 1)]; NSLog(@"%d", [v1 isEqual:v2]);
-hash not a problem:
NSLog(@"%d", ([v1 hash] == [v2 hash])); //logs "1"
These are different objects:
NSLog(@"%d", (v1 != v2));
The problem is in the code. Try to clean and restore.
source share