I've been looking at autoboxing in Objective-C (here, for instance). Is there a new syntax for unboxing?
For instance, I want to do this but shorter:
NSArray *oneNumber = @[@1];
int one = ((NSNumber *)oneNumber[0]).intValue;
the second line's syntax is horrific. Is there any new language feature to deal with this?
[oneNumber[0] intValue]
Sometimes the old ways are best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With