Sunday, 15 September 2013

How To Remove Object from NSMutableArray After Switching Tab View

How To Remove Object from NSMutableArray After Switching Tab View

So I am trying to remove all objects in an array, [myMutableArray
removeAllObjects], whenever a button is pushed or the tab view changes. I
know that for a button, I can use prepareForSegue:(UIStoryboardSegue
*)segue sender:(id)sender, and it works. But how do I do the same with a
tab?
I am doing this because I am using Parse, a web backend service, and I am
querying for the user's friends and putting it on a tableview, but unless
I remove all the objects from the array, I get duplicates of the names.
Any help is greatly appreciated!!

No comments:

Post a Comment