Finding Intersection of NSMutableArrays

前端 未结 5 1909
广开言路
广开言路 2020-11-28 09:30

I have three NSMutableArray containing names that are added to the lists according to different criterieas.

Here are my arrays pseudocode:

NSMutableA         


        
5条回答
  •  死守一世寂寞
    2020-11-28 10:36

    Have a look at this post.

    In short: if you can use NSSet instead of NSArray, then it's trivial (NSMutableSet has intersectSet:).

    Otherwise, you can build an NSSet from your NSArray and go back to the above case.

提交回复
热议问题