Search code examples
objective-ciosuitableviewnsdictionary

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?


Solution

  • You looking for this guy:

    [NSMutableDictionary addEntriesFromDictionary:]
    

    Make sure your UITableView dictionary is an NSMutableDictionary!

    Check it here