Jump to content

Associative array/Creation: Difference between revisions

m
(→‎version 2: expanded the first boxed comment for clarifiction of use. -- ~~~~)
Line 955:
[NSNull null], @"extra",
nil];</lang>
 
The same as the above with the new literal syntax in clang 3.1+ / Apple LLVM Compiler 4.0+ (XCode 4.4+) :
<lang objc>
NSDictionary *dict = @{
@"name": @"Joe Doe",
@"age": @42,
@"extra": [NSNull null],
};</lang>
 
To create a mutable dictionary, use NSMutableDictionary:
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.