-[__NSCFConstantString objectForKeyedSubscript:]: unrecognized selector sent to instance 0x100003680
原创
©著作权归作者所有:来自51CTO博客作者haocold的原创作品,请联系作者获取转载授权,否则将追究法律责任
0x00崩溃
__NSCFConstantString objectForKeyedSubscript:
unrecognized selector sent to instance 0x100003680
0x01直接上代码
NSDictionary *dic = @{@"views":@[@{@"tag":@"100"},@{@"tag":@"200"}]};
for (NSDictionary *subDic in dic) {
NSString *key = [NSString stringWithFormat:@"%@",subDic[@"tag"]];
NSLog(@"key:%@",key);
}
subDic
控制台输出的内容是:views
.
0x02结论
1.要遍历是应该是views
对应的value(数组)。
2.对一个字典进行遍历时,取到的是key。
数值跟踪Slider
https://github.com/xjh093/JHSlider