首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

NSDictionary遍历全部的key和Values

2012-09-06 
NSDictionary遍历所有的key和ValuesNSEnumerator *enumerator [theSelectedRowDict objectEnumerator]i

NSDictionary遍历所有的key和Values

NSEnumerator *enumerator = [theSelectedRowDict objectEnumerator];id key;while ((key = [enumerator nextObject])) {DLog(@">>>>>>>>>@@@>>>%@", key);/* code that uses the returned key */}

?

?

遍历key:

NSEnumerator *enumerator = [theSelectedRowDict keyEnumerator];id key;while ((key = [enumerator nextObject])) {DLog(@">>>>>>>>>@@@>>>%@", key);/* code that uses the returned key */}
?

热点排行