问题描述
|
将对象设置为字典后,我无法获得对象的实际计数。
我在myData(NSData object)中放了
一个结构指针pEvent,并将此NSData存储到字典中。
[m_cAppIdMap setobject:myData forKey:[NSNumber numberWithUnsignedShort:wTimerIds]];
int no = [m_cAppIdMap count];
NSLog(@\"The no of entries in array is:%d\",no);
解决方法
使用int no = [m_cAppIdMap.allKeys count];