How to convert An NSInteger to an int?
For example when passing a value message to an NSInteger instance like so [a value] it causes an EXC_BAD_ACCESS. So how to convert an NSInteger to int ? If it's relevant only small numbers < 32 are used. Dave DeLong Ta da: NSInteger myInteger = 42; int myInt = (int) myInteger; NSInteger is nothing more than a 32/64 bit int. (it will use the appropriate size based on what OS/platform you're running) If you want to do this inline, just cast the NSUInteger or NSInteger to an int : int i = -1; NSUInteger row = 100; i > row // true, since the signed int is implicitly converted to an unsigned int i