Reputation: 141
The following was coded in a while loop
[array_stations addObject:[dic_stations copy]];
[array_stations addObject:dic_stations ];
What is the differences between them? if [copy]
is not included, all the dictionary item will be the same inside the while loop, while NSLog
the array.
If [copy]
is added, all the items are list normally.
Thanks.
Upvotes: 0
Views: 50
Reputation: 6718
[dic_stations copy]
represents object of nsmutabledictionary
. dic_stations
represents object of nsdictionary
. For more details click this link.
Upvotes: 1