首页 > 代码库 > -[__NSCFNumber length]: unrecognized selector sent to instance 崩溃解决

-[__NSCFNumber length]: unrecognized selector sent to instance 崩溃解决

崩溃原因是由于:获取JSON数据后存放在默认的NSMutableArry里,NSMutableArry是存放id类型的,

uiTableViewCellMakeMoneyCustomCell.uiLabelActiveCountPoint.text=[nsMutableArryAllheActivesCountPoints objectAtIndex:indexPath.row];

使用时引起类型不一致;

转化一下就可以了

 uiTableViewCellMakeMoneyCustomCell.uiLabelActiveCountPoint.text=[[NSString alloc] initWithFormat:@"%@",[nsMutableArryAllheActivesCountPoints objectAtIndex:indexPath.row]];