Copying contents from one NSMutableArray to another
Posted
by Sheehan Alam
on Stack Overflow
See other posts from Stack Overflow
or by Sheehan Alam
Published on 2010-04-26T20:12:56Z
Indexed on
2010/04/26
20:33 UTC
Read the original article
Hit count: 235
I have two NSMutableArrays:
NSMutableArray* currentMessages
NSMutableArray* items
I am trying to copy the contents of items into currentMessages as such:
[self.currentMessages addObjectsFromArray:self.items];
When I am debugging self.items contains 30 objects. After this operation self.currentMessages contains 0 objects.
Why is the copy not working?
© Stack Overflow or respective owner