NSPredicate

#nspredicate #predicate #filter #%@ #%K

Overview

Subjects

Filtering

%@ => All the data

predicate: NSPredicate(format: "fieldname < %@", "criteria")  // filtering less than the criteria

%K %@

Sample Codes

predicate: nil  // no filtering
predicate: NSPredicate(format: "fieldname == 'criteria'")  // filtering

Sources

Videos

Hacking with Swift / 100 Days / Day-58 - Filtering @FetchRequest using NSPredicate

Articles / Documents

See also

Last updated