Use NSMutableDictionary
NSMutableDictionary *yourMutableDictionary = [NSMutableDictionary alloc] init];
[yourMutableDictionary setObject:@"Value" forKey:@"your key"];
Update for Swift:
The following is the exact swift replica for the code mentioned above
var yourMutableDictionary = NSMutableDictionary()
yourMutableDictionary.setObject("Value", forKey: "Key")
But i would suggest you to go with Swift Dictionary way.
var yourMutableDictionary = [String: AnyObject]() //Open close bracket represents initialization
//The reason for AnyObject is a dictionary's value can be String or
//Array or Dictionary so it is generically written as AnyObject
yourMutableDictionary["Key"] = "Value"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…