Initializer

init(value:)

Returns an NSNumber object initialized to contain a given value, treated as an NSInteger.

Declaration

init(value: Int)

Parameters

value

The value for the new number.

Return Value

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

See Also

Initializing an NSNumber Object

init(value: Bool)

Returns an NSNumber object initialized to contain a given value, treated as a BOOL.

init(value: Int8)

Returns an NSNumber object initialized to contain a given value, treated as a signed char.

init(value: Double)

Returns an NSNumber object initialized to contain value, treated as a double.

init(value: Float)

Returns an NSNumber object initialized to contain a given value, treated as a float.

init(value: Int32)

Returns an NSNumber object initialized to contain a given value, treated as a signed int.

init(value: Int64)

Returns an NSNumber object initialized to contain value, treated as a signed long long.

init(value: Int16)

Returns an NSNumber object initialized to contain a given value, treated as a signed short.

init(value: UInt8)

Returns an NSNumber object initialized to contain a given value, treated as an unsigned char.

init(value: UInt32)

Returns an NSNumber object initialized to contain a given value, treated as an unsigned int.

init(value: UInt)

Returns an NSNumber object initialized to contain a given value, treated as an NSUInteger.

init(value: UInt64)

Returns an NSNumber object initialized to contain a given value, treated as an unsigned long long.

init(value: UInt16)

Returns an NSNumber object initialized to contain a given value, treated as an unsigned short.