What is the meaning of @[object1, object2]?

157 Views Asked by At

Possible Duplicate:
What kind of object does @[obj1, obj2] create?

Looking at the Master-Detail Template in Xcode, in the App Delegate the SplitViewController's view controllers are set like so:

self.splitViewController.viewControllers = @[masterNavigationController, detailNavigationController];

I don't know what the purpose of the @ sign is before the square brackets. Is this just how NSArrays are made when not using [NSArray arrayWithObjects:]?

1

There are 1 best solutions below

0
On BEST ANSWER

It's a new syntax feature. It's syntactic sugar for creating an array (NSArray) with the given objects.