O'Reilly logo

Objective-C Programming: The Big Nerd Ranch Guide by Mikey Ward, Aaron Hillegass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

NSDictionary/NSMutableDictionary

A dictionary is a collection of key-value pairs. The key is typically a string, and the value can be any sort of object. Dictionaries are indexed by key: you provide a key and get back the value (an object) associated with that particular key. Keys in a dictionary are unique and a dictionary’s key-value pairs are not kept in any particular order.

Like arrays and sets, dictionaries can be mutable (NSMutableDictionary) or immutable (NSDictionary). Like NSArray, NSDictionary has a shorthand you can use when creating an immutable dictionary. The dictionary literal syntax is formed with the @ symbol and curly braces. Within the curly braces, you provide a comma-delimited list of the key-value pairs and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required