Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
bennyg
12y ago
0 comments
Save
Share
You can do this now @(100.5) for NSNumber literals.
0 comments
1 comments · 1 top-level
top
newest
oldest
dennis_vartan
12y ago
And even shorter, just @100.5 if what you have is a literal. The parentheses are needed if you're boxing a value, e.g.: @(price + 100.5)
In detail:
http://clang.llvm.org/docs/ObjectiveCLiterals.html
j
/
k
navigate · click thread line to collapse