See "NSNumber Literals" in http://clang.llvm.org/docs/ObjectiveCLiterals.html.
– Martin RJul 13 '13 at 11:49
1
Note that this is a relatively new compiler feature, so many books and other references will not discuss it. It goes with the notation of `@[a,b,c]` for an NSArray and several other enhancements, as shown in Martin R's link.
– Hot LicksJul 13 '13 at 12:43
You should probably use the Swift numeric types instead, like Int, Float etc. If you really need to use NSNumber in Swift, you can do it like this: `var num = NSNumber(value: 4)`
– DrummerBApr 14 '17 at 12:37