Xcode fix-it shortcut

筅森魡賤 提交于 2020-01-01 01:13:27

问题


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

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!