In Core Data, I have many attributes declared as Integer 64, and then accessed via NSNumber properties (this is the default).
Does it matter, do I save these values ββand get their access:
NSNumber *mySetValue = [NSNumber numberWithInt:someIntValue];
[myObject setMyNumberProperty:mySetValue];
int myRetrievedValue = [myObject.myNumberProperty intValue];
or
NSNumber *mySetValue = [NSNumber numberWithInteger:someIntegerValue];
[myObject setMyNumberProperty:mySetValue];
NSInteger myRetrievedValue = [myObject.myNumberProperty integerValue];
?
There are two cases for which I would like to know the answer: 1) if the required value is used for calculations (it contains the amount or value that will be converted into currency) and 2) if the value is just a type that will mainly be compared only with itself and will not be used for any calculations. Is it possible to use numberWithInt and intValue in one case and not in another case, or can I use numberWithInteger and integerValue as an argument in both cases?
, , [NSNumber numberWithInt:] - / , ?
, 32-, 64- iOS.
- , Core Data Integer 32, Integer 16, Integer 64 ..?