is it possible to remove multiple objects from an NSMutableArray by passing it a list or an array of objects you want to remove? Right now I have a deleteAll method that deletes all messages from a Parse server and then removes the messages from the local array.
However as this is asynchronous by the time it finishes deleting and then calls[myArray removeAllObjects] there may be a new message received that I don't want to accidentally delete from the array.
So I am thinking of copying the message array before I do the delete operation and when the asynchronous call is complete remove all elements from the message array that are the same as the copy.
Is there a nice way to do it or is my only option to iterate the array and delete if it matches what is in the copy one?