Instance Method

initWithDictionary:

Initializes a newly allocated dictionary by placing in it the keys and values contained in another given dictionary.

Declaration

- (instancetype)initWithDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;

Parameters

otherDictionary

A dictionary containing the keys and values with which to initialize the new dictionary.

Return Value

An initialized dictionary—which might be different than the original receiver—containing the keys and values found in otherDictionary.

See Also

Creating a Dictionary from Another Dictionary

+ dictionaryWithDictionary:

Creates a dictionary containing the keys and values from another given dictionary.

- initWithDictionary:copyItems:

Initializes a newly allocated dictionary using the objects contained in another given dictionary.