Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective-C Auto-unboxing with LLVM 4

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?

like image 358
Dan Rosenstark Avatar asked Jan 15 '13 16:01

Dan Rosenstark


1 Answers

[oneNumber[0] intValue]

Sometimes the old ways are best.

like image 159
Catfish_Man Avatar answered Oct 31 '22 18:10

Catfish_Man