Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Appending NSDictionary to other NSDictionary

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?

like image 632
slonkar Avatar asked Feb 13 '12 01:02

slonkar


People also ask

Does NSDictionary retain objects?

An NSDictionary will retain it's objects, and copy it's keys.

What is the difference between NSMapTable vs NSDictionary?

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.

What is the difference between NSDictionary and NSMutableDictionary?

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).

What is NSDictionary?

An object representing a static collection of key-value pairs, for use instead of a Dictionary constant in cases that require reference semantics.


Video Answer


1 Answers

You looking for this guy:

[NSMutableDictionary addEntriesFromDictionary:] 

Make sure your UITableView dictionary is an NSMutableDictionary!

Check it here

like image 159
MGA Avatar answered Oct 16 '22 16:10

MGA