Ios 从plist/dictionary转换为NSNumber时出错

Ios 从plist/dictionary转换为NSNumber时出错,ios,plist,nsdictionary,nsnumber,Ios,Plist,Nsdictionary,Nsnumber,我有一个包含一些默认值的plist文件 我的目标是在运行时将这些值复制到对象中 一半的值很好,另一半设置为无意义^^ plist: <dict> ... <key>averageCostDevelopPerApp</key> <integer>50000</integer> ... </dict> 这里是我在对象中设置数据的地方: [self setAverageCostDevelopPerApp: [dictionary

我有一个包含一些默认值的plist文件

我的目标是在运行时将这些值复制到对象中

一半的值很好,另一半设置为无意义^^

plist:

<dict>
...
<key>averageCostDevelopPerApp</key>
<integer>50000</integer>
...
</dict>
这里是我在对象中设置数据的地方:

[self setAverageCostDevelopPerApp: [dictionary objectForKey:@"averageCostDevelopPerApp"]];
我做了一些挖掘工作,发现objectforKey在一个“\uu NSCFNumber”中返回了什么


我猜我必须做一些转换,但我想不出来。

对不起,伙计们

在凌晨1点编码12小时后的一次短暂操作中发现,在数据模型中,属性设置为intger16

[self setAverageCostDevelopPerApp: [dictionary objectForKey:@"averageCostDevelopPerApp"]];