Command in Xcode to rewrite array creation to use literal syntax

183 Views Asked by At

I watched a WWDC video and saw that there is a Refactor option in Xcode that -- boom -- can automatically update your whole code to use the new, more readable notation.

Rather than doing [NSArray arrayWithObjects @"a",@"b",@"c",nil], e.g. , you simply do @[@"a",@"b",@"c"]

Where's the menu item in Xcode that will convert en masse?

1

There are 1 best solutions below

3
On BEST ANSWER

Select the target, Menu:Edit:Refactor:Convert to modern Objective-C Syntax.

enter image description here