init(object:forKey:)
Creates a dictionary containing a given key and value.
Declaration
convenience init(object: Any, forKey key: any NSCopying)Parameters
- object:
The value corresponding to
aKey.If this value is
nil, an Invalidargumentexception is raised. - key:
The key for
anObject.If this value is
nil, an Invalidargumentexception is raised.
Return Value
A new dictionary containing a single object, object, for a single key, aKey.