Type Method

numberWithInteger:

Creates and returns an NSNumber object containing a given value, treating it as an NSInteger.

Declaration

+ (NSNumber *)numberWithInteger:(NSInteger)value;

Parameters

value

The value for the new number.

Return Value

An NSNumber object containing value, treating it as an NSInteger.

See Also

Creating an NSNumber Object

+ numberWithBool:

Creates and returns an NSNumber object containing a given value, treating it as a BOOL.

+ numberWithChar:

Creates and returns an NSNumber object containing a given value, treating it as a signed char.

+ numberWithDouble:

Creates and returns an NSNumber object containing a given value, treating it as a double.

+ numberWithFloat:

Creates and returns an NSNumber object containing a given value, treating it as a float.

+ numberWithInt:

Creates and returns an NSNumber object containing a given value, treating it as a signed int.

+ numberWithLong:

Creates and returns an NSNumber object containing a given value, treating it as a signed long.

+ numberWithLongLong:

Creates and returns an NSNumber object containing a given value, treating it as a signed long long.

+ numberWithShort:

Creates and returns an NSNumber object containing value, treating it as a signed short.

+ numberWithUnsignedChar:

Creates and returns an NSNumber object containing a given value, treating it as an unsigned char.

+ numberWithUnsignedInt:

Creates and returns an NSNumber object containing a given value, treating it as an unsigned int.

+ numberWithUnsignedInteger:

Creates and returns an NSNumber object containing a given value, treating it as an NSUInteger.

+ numberWithUnsignedLong:

Creates and returns an NSNumber object containing a given value, treating it as an unsigned long.

+ numberWithUnsignedLongLong:

Creates and returns an NSNumber object containing a given value, treating it as an unsigned long long.

+ numberWithUnsignedShort:

Creates and returns an NSNumber object containing a given value, treating it as an unsigned short.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software