I have one NSDictionary
and it loads up UITableView
. If a user scrolls more and more, I call API and pull new data. This data is again in the form of an NSDictionary
. Is it possible to add the new NSDictionary
to the existing one?
An NSDictionary will retain it's objects, and copy it's keys.
NSDictionary / NSMutableDictionary copies keys, and holds strong references to values. NSMapTable is mutable, without an immutable counterpart. NSMapTable can hold keys and values with weak references, in such a way that entries are removed when either the key or value is deallocated.
Main Difference is:NSMutableDictionary is derived from NSDictionary, it has all the methods of NSDictionary. NSMutableDictionary is mutable( can be modified) but NSDictionary is immutable (can not be modified).
An object representing a static collection of key-value pairs, for use instead of a Dictionary constant in cases that require reference semantics.
You looking for this guy:
[NSMutableDictionary addEntriesFromDictionary:]
Make sure your UITableView
dictionary is an NSMutableDictionary
!
Check it here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With