This shows you the differences between two versions of the page.
objective-c:foundation.framework:nsdictionary.h:initwithobjectsandkeys [2014/05/30 21:23] Mo created |
objective-c:foundation.framework:nsdictionary.h:initwithobjectsandkeys [2024/02/16 01:12] (current) |
||
---|---|---|---|
Line 13: | Line 13: | ||
**Parameters** | **Parameters** | ||
- | A null-terminated list of alternating values and keys. | + | - A null-terminated list of alternating values and keys. |
firstObject - The first value to add to the new dictionary. | firstObject - The first value to add to the new dictionary. | ||
Line 23: | Line 23: | ||
<code objc> | <code objc> | ||
- | // ** Init dictionary with entries | + | // ** Init dictionary with entries ** |
NSDictionary *myDictionary = [[NSDictionary alloc]initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil]; | NSDictionary *myDictionary = [[NSDictionary alloc]initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil]; | ||
- | // ** Output dictionary | + | // ** Output dictionary ** |
NSLog(@"myDictionary: %@", myDictionary); | NSLog(@"myDictionary: %@", myDictionary); | ||