一次运行所有 Xcode 的“修复程序”

在升级到 Xcode 7以支持 iOS 9之后,我遇到了数以百计的修复错误和警告。有没有一个按钮可以让 Xcode 运行所有的代码,而不是单独地一个一个地运行它们?

25553 次浏览

XCode's "fix-it" isn't always reliable enough to make the changes that the code needs to run properly. Even if there was such a button, I wouldn't advise using it. The only thing I can think of to make it quicker to go through is to use: Navigate > Jump to Next Issue which would mean you wouldn't have to comb through the code to find all of the errors, Xcode would take you straight to them.

There is actually a solution for this in Xcode 7.21's Editor menu.

enter image description here

This is the shortcut:

+++f

which is

ctrl+alt+cmd+f

1 This is the version I can confirm, might work in earlier versions as well.

control - option - command - f

f

Fix All Issues button in Xcode 10.3

0