NSMutableArray check if object already exists

前端 未结 9 1437
傲寒
傲寒 2020-12-25 10:17

I am not sure how to go about this. I have an NSMutableArray (addList) which holds all the items to be added to my datasource NSMutableArray.

I now

9条回答
  •  攒了一身酷
    2020-12-25 10:40

    You compare the addList's first object and appDelegate.list's first object, if they are not equal, you insert the addList's object. The logic is wrong, you should compare one addList's object with every appDelegate.list's object.

提交回复
热议问题