NSMutableArray *dbNsArr = [[NSMutableArray alloc] init];
NSMutableArray*requestNsArr = [[NSMutableArrayalloc]init];
for(inti =0; i < dbArr.count; i++) {
GroupMemberListModel*model = dbArr[i];
[dbNsArraddObject:model.memberId];
}
for(intj =0; j < requestArr.count; j++) {
GroupMemberListModel*model = requestArr[j];
[requestNsArraddObject:model.memberId];
}
NSMutableSet*dbSet = [NSMutableSetsetWithArray:dbNsArr];
NSMutableSet*requestSet = [NSMutableSetsetWithArray:requestNsArr];
[requestSetminusSet:dbSet];
NSMutableSet*allSet = [NSMutableSetsetWithArray:requestNsArr];
[dbSetminusSet:allSet];
[requestSetunionSet:dbSet];
NSArray*outMemberArr = [requestSetallObjects];
网友评论