spandana
spandana

Reputation: 755

Not getting correct count of NSMutableDictionary

I could not able to get the actual count of object after setting it to the dictionary. I am having a structure pointer pEvent which i have put up in myData(NSData object).and I am storing this NSData into the dictionary.

[m_cAppIdMap setObject:myData forKey:[NSNumber numberWithUnsignedShort:wTimerIds]];
int no = [m_cAppIdMap count];
NSLog(@"The no of entries in array is:%d",no);

Upvotes: 0

Views: 622

Answers (1)

Simon Lee
Simon Lee

Reputation: 22334

Use int no = [m_cAppIdMap.allKeys count];

Upvotes: 1

Related Questions