[__NSCFNumber length]: unrecognized selector sent to instance 0x1657c5c0
2014-09-24 14:47:39.170 StarShow[1948:60b] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException‘, reason: ‘-[__NSCFNumber length]: unrecognized selector sent to instance 0x1657c5c0‘
*** First throw call stack:
错误原因:服务器那边传过来的是int类型的,我这边定义的对象的作品这个属性是string类型的。与后台返回数据类型老是出错(文档和现实老是对接不上)
hot.showWorks
= [NSString
stringWithFormat:
@"%@",[dictionary
objectForKey:@"worknum"]];//Int作品数
与后台返回数据类型老是出错(文档和现实老是对接不上)
原文:http://blog.csdn.net/u010241322/article/details/44596135