I am saving different codes in a array and now want to check if one code is in the array.
I searched a bit around but nothing working...
Here you see how my array looks:
2013-04-28 12:43:23.877 myApp[9422:907] PushArray: (
{
code = 123;
titel = "Test 01";
},
{
code = 456;
titel = "Test 02";
},
{
code = 789;
titel = "Test 03";
}
)
I tried this to check:
NSString *code = [NSString stringWithFormat:@"123"];;
if ([PushArray containsObject:code]) {
NSLog(@"Code true!");
}else {
NSLog(@"Code false!");
}
But every time I get "Code false!" back...