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 NSArray
s are made when not using [NSArray arrayWithObjects:]
?
It's a new syntax feature. It's syntactic sugar for creating an array (NSArray
) with the given objects.