CCArray* test = [CCArray array];[test addObject:[NSNumber numberWithInt:99]];if ([test containsObject:[NSNumber numberWithInt:99]]) { NSLog(@"it works");}else { NSLog(@"Something is wrong!");}
This is because CCArray compares pointers. See: http://www.cocos2d-iphone.org/forum/topic/12760
No comments:
Post a Comment