NSInteger is integer object. So surely there should be long object?
Why is there NSInteger and not NSLong or even NSLongLong?
791 Views Asked by GeneCode At
2
There are 2 best solutions below
0
On
NSInteger is a foundation type, as you can see here.
There are also other useful primitive types, like NSRect, NSSize, etc.
Apple simply chose not to have a NSLong or NSLongLong type defined in foundation.
More information as to when to use NSInteger (and what the considerations are behind them) can be found in this related question.
NSIntegerandNSUIntegerare platform specific, so on 32 bit system is declared as an int and on 64 bit system it is declared as a long.