I am looking at a tutorial and I am not sure what the line of code means:
self.objectsToShare = @[URL];
URL
is an NSURL
, and self.objectsToShare
is an NSArray
.
I am looking at a tutorial and I am not sure what the line of code means:
self.objectsToShare = @[URL];
URL
is an NSURL
, and self.objectsToShare
is an NSArray
.
It is a shorthand syntax for array creation.
Instead of:
More information here: http://clang.llvm.org/docs/ObjectiveCLiterals.html