Tutorial by Examples

let fetchRequest = NSFetchRequest(entityName: "Foo") var thePredicate: NSPredicate? thePredicate = NSPredicate(format: "message == 'example'") The entity Foo has a message string attribute
Rather than passing a static string as a predicate's criteria. It is possible to substitute values by using format specifiers. There are five format specifiers: %K is a var arg substitution for a key path. %@ is a var arg substitution for an object value-often a string, number, date, or an array...

Page 1 of 1