NSNumber
//用来封装 基本数据类型 int float double char ….
以前@“5” @“6” @“7” 把基础数据类型都转化成NSNumber
- (NSNumber *)numberWithChar:(char)value;
- (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
- (NSNumber *)numberWithShort:(short)value;
- (NSNumber *)numberWithUnsignedShort:(unsigned short)value;
- (NSNumber *)numberWithInt:(int)value;
- (NSNumber *)numberWithUnsignedInt:(unsigned int)value;
- (NSNumber *)numberWithLong:(long)value;
- (NSNumber *)numberWithUnsignedLong:(unsigned long)value;
- (NSNumber *)numberWithLongLong:(long long)value;
- (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value;
- (NSNumber *)numberWithFloat:(float)value;
- (NSNumber *)numberWithDouble:(double)value;
- (NSNumber *)numberWithBool:(BOOL)value;
- (NSNumber *)numberWithInteger:(NSInteger)value NS_AVAILABLE(10_5, 2_0);
- (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value NS_AVAILABLE(10_5, 2_0);
//取方法 使用get方法就可以
@property (readonly) char charValue;
@property (readonly) unsigned char unsignedCharValue;
@property (readonly) short shortValue;
@property (readonly) unsigned short unsignedShortValue;
@property (readonly) int intValue;
@property (readonly) unsigned int unsignedIntValue;
@property (readonly) long longValue;
@property (readonly) unsigned long unsignedLongValue;
@property (readonly) long long longLongValue;
@property (readonly) unsigned long long unsignedLongLongValue;
@property (readonly) float floatValue;
@property (readonly) double doubleValue;
@property (readonly) BOOL boolValue;
@property (readonly) NSInteger integerValue NS_AVAILABLE(10_5, 2_0);
@property (readonly) NSUInteger unsignedIntegerValue NS_AVAILABLE(10_5, 2_0);