Reputation: 3601
Core Data has int16, int32, and int64. When working with these in their NSNumber form should I use NSInteger or int ( and their respective NSNumber methods numberWithInt, numberWithInteger ). I have been using int for int16 and NSInteger for int32, but I don't know if this is correct. I would just like some clarification.
Upvotes: 6
Views: 3308
Reputation: 14549
NSInteger is at least 32 bit, as is int. I wouldn't ever use int16, unless you need to represent a short.
NSInteger can also be 64 bit, in a 64bit runtime...
Upvotes: 4