Creates an empty dictionary.
SDK
- Xcode 6.1+
Framework
- Swift Standard Library
Creates an empty dictionary.
SDK
Framework
init(minimum Capacity: Int)
Creates an empty dictionary with preallocated space for at least the specified number of elements.
init<S>(unique Keys With Values: S)
Creates a new dictionary from the key-value pairs in the given sequence.
init<S>(S, uniquing Keys With: (Value, Value) -> Value)
Creates a new dictionary from the key-value pairs in the given sequence, using a combining closure to determine the value for any duplicate keys.
init<S>(grouping: S, by: (S .Element) -> Key)
Creates a new dictionary whose keys are the groupings returned by the given closure and whose values are arrays of the elements that returned each key.