User Tools

Site Tools


objective-c:foundation.framework:nsdictionary.h:allkeys
click
to support this page (eg 0,42 € or so) Thanks.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

objective-c:foundation.framework:nsdictionary.h:allkeys [2014/06/08 01:48] (current)
Mo created
Line 1: Line 1:
 +===== allKeys =====
  
 +<code objc>    
 +
 +- (NSArray *)allKeys
 + 
 +</code>
 +
 +Returns a new array containing the dictionary’s keys, or an empty array if the dictionary has no entries.
 +
 +**Return Value**
 +- NSArray
 +
 +===== ObjC Sourcecode Example =====
 +
 +<code objc>
 +
 +    // ** Init dictionary with entries
 +    NSDictionary *myDictionary = [[NSDictionary alloc]initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil];
 +    
 +    NSArray *keysArray = [myDictionary allKeys];
 +    
 +    // ** Output dictionary keys
 +    NSLog(@"myDictionary all keys: %@", keysArray);
 +
 +</code>
 +
 +
 +==== Output for this example code ====
 +<code>
 +
 +2014-06-08 01:47:29.180 NSDictionary[3462:70b] myDictionary all keys: (
 +    key2,
 +    key1
 +)
 +
 +</code>
advertising
objective-c/foundation.framework/nsdictionary.h/allkeys.txt · Last modified: 2014/06/08 01:48 by Mo

Impressum