Questions tagged «nsuinteger»

2
我应该使用Core Data中的什么NSNumber(整数16、32、64)保留NSUInteger
我想将NSUInteger保留在我的核心数据中,但我不知道应该使用哪种类型(整数16、32、64)来适应所需的空间。 据我了解: Integer 16 can have minimum value of -32,768 to 32,767 Integer 32 can have minimum value of -2,147,483,648 to 2,147,483,647 Integer 64 can have minimum value of -very large to very large 并且NSUInteger是无符号long的def类型,它等于unsigned int(iPhone上的Objective-c中的类型) 因此,如果我将我的NSUInteger转换为具有numberWithUnsignedInteger:的NSNumber并将其另存为NSNumber(Integer 32),我可以安全地取回数据了吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.