NSPredicate with multiple arguments and “AND behaviour”

后端 未结 4 1511
夕颜
夕颜 2020-12-19 02:51

I have a function which fetches those objects from a particular entity that fulfill a specified criterion:

func fetchWithPredicate(entityName: String, argume         


        
4条回答
  •  误落风尘
    2020-12-19 03:42

    Swift 3

    I found easiest way.

    var predicate = NSPredicate(format: "key1 = %@ AND key2 = %@", value1, value2)
    

提交回复
热议问题