1

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?

jscs
  • 63,694
  • 13
  • 151
  • 195
user4951
  • 32,206
  • 53
  • 172
  • 282

1 Answers1

2

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

enter image description here

zaph
  • 111,848
  • 21
  • 189
  • 228
  • If I do this, will I forgo IOS5? – user4951 Oct 14 '12 at 15:40
  • 1
    Modern Objective-C Syntax is supported back to iOS 4.3, it is part of ARCLite. – zaph Oct 14 '12 at 15:41
  • ARCLite is only needed for subscripting. Collection literals, NSNumber literals, and boxed expressions are just syntactic sugar for old API, so you can deploy to any older OS version with those. – rickster Oct 14 '12 at 20:21