iOS开发 NSDictionary的简单遍历
<div id="cnblogs_post_body">-(void)dictionaryPrint{
NSArray *keys = [dic allKeys];
id key,value;
for (int i = 0; i < count]; i++) {
key = objectAtIndex:i];
value = [dic objectForKey:key];
//NSLog(@"Key:%@ -- %@",key,value);
for (int j = 0; j<count]; j++) {
NSString *str = objectAtIndex:j];
NSLog(@"%@---%@",key,str);
}
}
}
更多阅读请访问http://www.hopean.com
页:
[1]