Dlaczego pierwszy z wymienionych fragmentów działa, a nie drugi?Dynamiczne tworzenie NSPredicate przez programowe ustawianie klucza
Snippet 1
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(coin_unique == %@)", [NSNumber numberWithInt:species]];
Snippet 2
// Does NOT Work
NSString *predicateText = @"coin_unique";
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(%@ == %@)", predicateText, [NSNumber numberWithInt:species]];
mam do dynamicznego tworzenia predykatu w zależności od argumentu otrzymała w moim sposobem.