I have two NSMutableArray: arrayone and arraytwo
arrayone and arraytwo are full of objects, but I want cancel all objects of arrayone and insert in this array all objects of arraytwo. then I want overwrite arrayone with arraytwo.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Lets say you have:
Now you can remove all objects and insert the new objects like this:
Or release the array and initialize a new one like this:
In both cases
NSLog(@"%@",arrayOne);shows: