谓词 查找不同的元素

  NSMutableArray *onArray = [NSMutableArray arrayWithCapacity:0];
            for (THJionAndSitDownModle *mTHJionAndSitDownModle in joindata) {
                
                NSPredicate * filterPredicate = [NSPredicate predicateWithFormat:@"SELF.userId == %@",mTHJionAndSitDownModle.userId];
                
                NSArray * filter = [sitDowndata filteredArrayUsingPredicate:filterPredicate];
                
                if(filter.count == 0){
                    
                    [onArray addObject:mTHJionAndSitDownModle];  //得到坐下人员id
                }
                
            }

  

posted @ 2016-12-28 18:01  牵着蜗牛走的我  阅读(150)  评论(0编辑  收藏  举报