Created
January 16, 2014 12:12
-
-
Save hachinobu/8453941 to your computer and use it in GitHub Desktop.
NSNumberの便利な使い方
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSNumber *intNum = @1; | |
NSNumber *floatNum = @1.23f; | |
NSNumber *doubleNum = @1.2345; | |
NSNumber *boolNum = @YES; | |
NSNumber *charNum = @'a'; | |
int numInt = [intNum intValue]; | |
float numFloat = [floatNum floatValue]; | |
double numDouble = [doubleNum doubleValue]; | |
BOOL numBool = [boolNum boolValue]; | |
char numChar = [charNum charValue]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment