I think you are confusing NSInteger with the Objective-C class.
NSInteger is just a typedef d integer:
#if __LP64__ || NS_BUILD_32_LIKE_64 typedef long NSInteger; typedef unsigned long NSUInteger; #else typedef int NSInteger; typedef unsigned int NSUInteger; #endif
If you want something that contains a number, which may be nil , then you probably want NSNumber .
trojanfoe
source share