int i=100;
float f=2.34;
NSNumber *n1=[NSNumber numberWithInt:i];
NSNumber *n2=[NSNumber numberWithFloat:f]
将NSNumber类型转换成基本类型
i=[n1 intvalue]
f=[n2 floatValue];
2023-10-12 07:58:10
int i=100;
float f=2.34;
NSNumber *n1=[NSNumber numberWithInt:i];
NSNumber *n2=[NSNumber numberWithFloat:f]
将NSNumber类型转换成基本类型
i=[n1 intvalue]
f=[n2 floatValue];