Initializer

init(dictionaryLiteral:)

Initializes a newly allocated dictionary from the given key-value pairs.

Declaration

required convenience init(dictionaryLiteral elements: (Any, Any)...)

Parameters

elements

A variadic array of two-member tuples, where the first member is a key and the second is its corresponding value.

Relationships

See Also

Creating a Dictionary from Another Dictionary

init(dictionary: [AnyHashable : Any])

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

init(dictionary: [AnyHashable : Any], copyItems: Bool)

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