1.问题描述
这次在建数据模型Model时,选择了继承NSDictionary而不是NSObject,于是问题就来了。
在从服务器对返回的数据进行解析后赋值时,就出现了 [NSArray count]: method only defined for abstract class的问题。
然后问题定位是在model.allKeys这行。
2.问题阐述
谷歌了下有个回答
NSDictionary is a class cluster. This means that the value returned from its init methods is not strictly an NSDictionary, but a subclass that implements the actual functi