Instance Method

setDictionary:

Sets the contents of the receiving dictionary to entries in a given dictionary.

Declaration

- (void)setDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;

Parameters

otherDictionary

A dictionary containing the new entries.

Discussion

All entries are removed from the receiving dictionary (with removeAllObjects), then each entry from otherDictionary added into the receiving dictionary.

See Also

Adding Entries to a Mutable Dictionary

- setObject:forKey:

Adds a given key-value pair to the dictionary.

- setObject:forKeyedSubscript:

Adds a given key-value pair to the dictionary.

- setValue:forKey:

Adds a given key-value pair to the dictionary.

- addEntriesFromDictionary:

Adds to the receiving dictionary the entries from another dictionary.