I am wondering is there any shortcut or hotkey that can apply the fix-it suggestion from Xcode? (Xcode 7)
In Android Studio, we can just use ctrl+enter to apply the correction. Is there anything similar to that in Xcode?
some ref:
https://swifteducation.github.io/assets/pdfs/XcodeKeyboardShortcuts.pdf
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I am aware of two shortcuts.
Ctrl + Cmd + '
- auto fix next error
Ctrl + Cmd + "
- auto fix prev error
Enjoy!
回答2:
In Xcode 8, this appears to now be
⌃⌥⌘F
or
Ctrl + Alt + Cmd + F
If you want to change it, go to Xcode
> Preference
> Key Bindings
and search for Fix all in scope
.
回答3:
control - option - command - f
⌃
⌥
⌘
f
回答4:
Here are the default key bindings for XCode 8
回答5:
Unlike Android Studio
where you can apply a fix to a single issue, the Xcode
are able to fix all issues at time via Editor -> Fix All Issues