问题
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 errorCtrl + 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
Then
⌘
enter
To get out of split view.
回答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
来源:https://stackoverflow.com/questions/34423765/xcode-fix-it-shortcut