NSMutableDictionary
A dynamic collection of objects associated with unique keys.
Declaration
class NSMutableDictionaryOverview
In Swift, you can use this type instead of a Dictionary variable in cases that require reference semantics.
The NSMutableDictionary class declares the programmatic interface to objects that manage mutable associations of keys and values. It adds modification operations to the basic operations it inherits from NSDictionary.
NSMutableDictionary is “toll-free bridged” with its Core Foundation counterpart, CFMutableDictionary. See Toll-Free Bridging for more information on toll-free bridging.
Setting Values Using Subscripting
In addition to the provided instance methods, such as setObject(_:forKey:), you can access NSDictionary values by their keys using subscripting.
Subclassing Notes
There should typically be little need to subclass NSMutableDictionary. If you do need to customize behavior, it is often better to consider composition rather than subclassing.
Methods to Override
In a subclass, you must override both of its primitive methods:
You must also override the primitive methods of the NSDictionary class.
Topics
Creating and Initializing a Mutable Dictionary
Adding Entries to a Mutable Dictionary
Removing Entries From a Mutable Dictionary
Initializers
Instance Methods
addApplicationParameterHeader(_:length:)addAuthorizationChallengeHeader(_:length:)addAuthorizationResponseHeader(_:length:)addBodyHeader(_:length:endOfBody:)addByteSequenceHeader(_:length:)addConnectionIDHeader(_:length:)addCountHeader(_:)addDescriptionHeader(_:)addHTTPHeader(_:length:)addImageDescriptorHeader(_:length:)addImageHandleHeader(_:)addLengthHeader(_:)addNameHeader(_:)addObjectClassHeader(_:length:)addTargetHeader(_:length:)addTime4ByteHeader(_:)addTimeISOHeader(_:length:)addTypeHeader(_:)addUserDefinedHeader(_:length:)addWhoHeader(_:length:)getHeaderBytes()