■NSNumberへ変換・short
Integer
NSNumber *number = [NSNumber numberWithShort:(short)];
・int
NSNumber *number = [NSNumber numberWithInt:(int)];
・NSInteger
NSNumber *number = [NSNumber numberWith:(NSInteger)];
・long
NSNumber *number = [NSNumber numberWithLong:(long)];
・float
NSNumber *number = [NSNumber numberWithFloat:(float)];
・double
NSNumber *number = [NSNumber numberWithDouble:(double)];
・BOOL
NSNumber *number = [NSNumber numberWithBool:(BOOL)];
・char
NSNumber *number = [NSNumber numberWithChar:(char)];
[iOS] NSNumberの使い方
« [iOS] 配列の使い方 [xcode warning] linker command failed with exit code 1 (use -v to see invocation) »
コメントを残す