Top "Nspredicate" questions

The NSPredicate class is used in Mac OS X and iOS development to define logical conditions used to constrain a search either for a fetch or for in-memory filtering.

Filter Array of Objects with NSPredicate based on NSInteger property in super class

I've got the following setup: @interface Item : NSObject { NSInteger *item_id; NSString *title; UIImage *item_icon; } @property (nonatomic, copy) NSString *…

objective-c nsarray nspredicate kvc
NSPredicate with Multiple Conditions

I am trying to create a NSPredicate with multiple conditions. I've found several solutions, but none of them appear to …

ios objective-c nspredicate
NSPredicate, NsNumber numberWithFloat:0.0 (iPhone)

hi i have Core Data database with numerical attributes. they are NSNumbers. Default value is 0.0 but when i try to …

iphone nspredicate nsnumber
How to use the "ALL" aggregate operation in a NSPredicate to filter a CoreData-based collection

Based on the data model below And based on user input I create a NSSet of managedObjects of entity Tag …

objective-c ios core-data nspredicate
Sorting NSMutableArray using SortDescriptor AND Predicate possible?

I have an array of type "Restaurant" which has an NSSet of "Rating." Rating has an ID and a value. …

objective-c nsarray nspredicate nssortdescriptor
NSFetchRequest with distinct properties

I'm trying to get a distinct result from NSPredicate. My code: NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"…

iphone ios core-data nspredicate distinct-values
NSPredicate and Regex

Can someone please help me with using Regex with NSPredicate? NSString *regex = @"(?:[A-Za-z0-9])"; NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", …

objective-c regex nspredicate
Can't pass Date to NSPredicate(format: ...) without "as CVarArg"

Is this how I'm supposed to pass a Date to NSPredicate.init(format predicateFormat: String, arguments argList: CVaListPointer). let endDate = …

swift swift3 nsdate nspredicate foundation
NSPredicate something equivalent of SQL's GROUP BY

To simplify: There are 3 columns in a table named cards. id packTitle term id is a column - integers from 0.....100 …

objective-c ios core-data nspredicate
NSInvalidArgumentException', reason: 'Invalid predicate: nil RHS, need help figuring this out

I've read other posts about this crash having something to do with the predicate returning nil but im unable to …

nspredicate nsfetchedresultscontroller invalidargumentexception