I don't understand why, the containsObject method seems to always return NO, here is my method :
-(void)addTockens:(NSString *)tockens
{
if ([tockens length] == 2 && ![self.tockensArray containsObject:tockens]) {
[self.tockensArray addObject:tockens];
NSLog(@"Added");
}
}
And here is what I am doing :
TADIgnoringConstraint *ignorer = [TADIgnoringConstraint new];
[ignorer addTockens:@"[]"];
[ignorer addTockens:@"[]"];
I am getting two "Added" in the console even if it shouldn't do that the second time I am trying to add "[]" since "[]" is already in the table.