ios - Predicate Query for CoreData -
i want write search function using nspredicate search start of element [not contains, have start].
right predicate is:
nspredicate *resultpredicate = [nspredicate predicatewithformat:@"self contains[cd] %@", searchtext]; how can search string start ?
use beginswith instead of contains. note can still use [cd] when using beginswith.
see full documentation here.
Comments
Post a Comment