User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







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

count

 
- (NSUInteger)count
 

Returns the number of entries in a dictionary.

Return Value - NSUInteger

ObjC Sourcecode Example

    // ** Init dictionary with entries
    NSDictionary *myDictionary = [[NSDictionary alloc]initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil];
 
    int count = myDictionary.count;
 
    // ** Output dictionary count
    NSLog(@"myDictionary count: %i", myDictionary.count);

Output for this example code

2014-06-08 01:23:01.080 NSDictionary[3367:70b] myDictionary count: 2
advertising
objective-c/foundation.framework/nsdictionary.h/count.txt · Last modified: 2014/06/08 01:34 by Mo

Impressum Datenschutz