天天看點

用謂詞在數組中取得符合條件的元素

  nspredicate *predicate = [nspredicate predicatewithformat:@"userphonenumber == %@", model.userphonenumber];

    vrdetailsvc.listarray = [self.recorddataarray1 filteredarrayusingpredicate:predicate];//這就是符合謂詞要求的結果