您的位置:首页 > 其它

遍历数组的两种写法,for循环和forin

2014-09-25 11:39 316 查看


for (int index =
0; index < adShowListArray.count; index ++) {
NSDictionary *dict = [adShowListArray
objectAtIndex:index];
if ([[dict valueForKey:@"ad_show_type"]
intValue] == 3){
NSLog(@"%@",dict);
}

}
for (NSDictionary *dict
in adShowListArray) {
if ([[dict valueForKey:@"ad_show_type"]
intValue]== 3) {
NSLog(@"%@",dict);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: