How can I compare two NSNumbers or a NSNumber and an Integer in an NSPredicate?
I tried:
NSNumber *stdUserNumber = [NSNumber numberWithInteger:[[NSUserDefaults standardUserDefaults] integerForKey:@"standardUser"]];
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"userID == %@", stdUserNumber];
Well, this doesn't work ... anyone has an idea how to do it? I'm sure it's pretty easy but I wasn't able to find anything ...
question from:https://stackoverflow.com/questions/7540329/nspredicate-compare-with-integer