NSPredicate
複数の条件を一致させるためにどのように使用しますか?
質問がありますSelect * from Entity where name = "Sony" and type ="cd";
どうすればこれを提出できand
ますNSPredicate
か?
NSPredicate
複数の条件を一致させるためにどのように使用しますか?
質問がありますSelect * from Entity where name = "Sony" and type ="cd";
どうすればこれを提出できand
ますNSPredicate
か?
これは Apple 開発者の Web サイトからのもので、NSPredicate を適切に使用する方法の例があります。
NSPredicate で AND または OR 条件を使用する場合の例を次に示します。
NSPredicate *predicate =[NSPredicate predicateWithFormat:@"artist contains[cd] %@
OR album contains[cd] %@ OR title contains[cd] %@",
self.searchBar.text, self.searchBar.text, self.searchBar.text];