3

I'm using Swift to develop an iOS app. I just switched to Swift 3.0 and some parts of my code have not been converted automatically but Xcode still offers me suggestions to modify some of the lines of code. ( c.f. screenshot below )

Is there a way to apply all of these suggestions at once ?

enter image description here

rmaddy
  • 307,833
  • 40
  • 508
  • 550
Randy
  • 4,085
  • 3
  • 25
  • 62
  • If i remember right, when there is warnings you can select the yellow dot and then from there apply multiple, but i believe it would be per file. Id try that. – Dallas Sep 21 '16 at 17:25
  • 2
    No there is none. It's a good exercise to resolve the issues manually. You will learn a lot about the new syntax of Swift 3. – vadian Sep 21 '16 at 17:32
  • Possible duplicate of [Xcode fix-it shortcut](https://stackoverflow.com/questions/34423765/xcode-fix-it-shortcut) – ScottyBlades May 28 '18 at 22:51

3 Answers3

6

Go to your issue navigator and highlight everything you want to fix. Then go to Editor -> Fix All in Scope.

nighttalker
  • 876
  • 6
  • 13
2

command - option - control - f

f

ScottyBlades
  • 9,795
  • 4
  • 62
  • 71
1

There are some keyboard shortcuts for fixing issues, specifically Jump and Fix Next Issue, keyboard command ⌃⌘'

These should make things a bit faster even if they don't fix everything automatically.

Patrick Tescher
  • 3,306
  • 1
  • 17
  • 30