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.

Using NSPredicate to filter an NSArray based on NSDictionary keys

I have an array of dictionaries. I want to filter the array based on a key. I tried this: NSPredicate *…

objective-c cocoa nsarray nsdictionary nspredicate
NSPredicate: filtering objects by day of NSDate property

I have a Core Data model with an NSDate property. I want to filter the database by day. I assume …

objective-c core-data nsdate nspredicate nsfetchedresultscontroller
How to fetch all contacts record in iOS 9 using Contacts Framework

Most part of AddressBook framework is deprecated in iOS 9. In the new Contacts Framework documentation only shows how to fetch …

ios ios9 nspredicate contacts
NSPredicate to test for NULL, and blank strings

I have an NSArray and need to filter out any strings that are null or rather, have ' ' (empty …

ios objective-c nspredicate
NSPredicate Exact Match with String

I have a NSPredicate like this: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"entity.name CONTAINS %@", myString]; But that will return anything which …

objective-c ios core-data nsstring nspredicate
Combining 'AND' and 'OR' Condition in NSPredicate

Back again needing more help with constructing my NSPredicates :( Category { name:string subs<-->>SubCategory } SubCategory { name:…

ios core-data nspredicate
Using NSPredicate to determine if a string equals another string

I have an NSArray of CalEvents returned with the [CalCalendarStore eventPredicateWithStartDate] method. From the events returned, I am trying to …

objective-c nsstring nsarray nspredicate
core data - the primary key id of a row in the database

Suppose I have a list of books stored in Core Data. I want to search for a book by it's …

iphone xcode core-data nspredicate nsmanagedobject
iPhone - getting unique values from NSArray object

I have an NSArray formed with objects of a custom class. The class has 3 (city, state, zip) string properties. I …

iphone nsarray nspredicate
NSPredicate compare with Integer

How can I compare two NSNumbers or a NSNumber and an Integer in an NSPredicate? I tried: NSNumber *stdUserNumber = [NSNumber …

ios objective-c core-data nspredicate