on Mac OS X, NSNumber is a subclass of NSValue that offers a value as any C scalar (numeric) type
NSNumber
is a subclass of NSValue
that offers a value as any C scalar (numeric) type. It defines a set of methods specifically for setting and accessing the value as a signed or unsigned char, short int, int, long int, long long int, float, or double or as a BOOL
. (Note that number objects do not necessarily preserve the type they are created with.)