User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:foundation.framework:nsdictionary.h:allkeys

allKeys

 
- (NSArray *)allKeys
 

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

    // ** 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);

Output for this example code

2014-06-08 01:47:29.180 NSDictionary[3462:70b] myDictionary all keys: (
    key2,
    key1
)
advertising
objective-c/foundation.framework/nsdictionary.h/allkeys.txt · Last modified: 2014/06/08 01:48 by Mo

Impressum Datenschutz