Contents

setDictionary(_:)

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

Declaration

func setDictionary(_ otherDictionary: [AnyHashable : Any])

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