Created
September 10, 2012 08:07
-
-
Save ksm/3689585 to your computer and use it in GitHub Desktop.
NSNumber literals with types
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 *value; | |
value = @'X'; // char | |
value = @12345 // int | |
value = @12345ul // unsigned long | |
value = @12345ll // long long | |
value = @123.45f // float | |
value = @123.45 // double | |
value = @YES // BOOL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment