-[__NSArrayM length]: unrecognized selector sent to instance 0x1006eaee0

今天碰到了个问题闪退
上网在stack overflow上查了下,

-[__NSArrayM length]: unrecognized selector sent to instance 0x1006eaee0_第1张图片
屏幕快照 2016-12-03 下午10.36.32.png

但是我并没有给NSArray,length方法。
调试了半天,发现服务器返回的数据有问题。

[cell.iconView sd_setImageWithURL:[NSURL URLWithString:[baseUrl stringByAppendingString:feed.img_list[0]]] placeholderImage:[UIImage imageNamed:@"1"]];

feed.img_list[0]应该是个字符串,但是它在第16条返回个数组,所以程序会闪退。

你可能感兴趣的:(-[__NSArrayM length]: unrecognized selector sent to instance 0x1006eaee0)