謂詞 查找不一樣的元素

  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
                }
                
            }
相關文章
相關標籤/搜索