Primitive values and Objects

来源:互联网 发布:报警电话 知乎 编辑:程序博客网 时间:2024/06/10 07:20

Dictionaries cannot contain primitive values such as int and BOOL, only objects. The same thing goes for arrays. If you want to put an int or BOOL values into a dictionary or array, you have to convert it intoNSNumber object first.

to get an integer number out of NSNumber object, [number intValue]

[number boolValue]

原创粉丝点击