Must-Know Xcode Shortcuts for Senior iOS Developers
- Mason Chang
- 2024年12月3日
- 讀畢需時 1 分鐘
已更新:5月29日
Use Code Snippet
We need to write repetitive codes sometimes, which costs us a lot of time.
For Example when you write a swiftUI's subviews or create a button with an action(auto-complete doesn't provide an action block as default)
Way:
Select the temple you want to reuse and open the drop down menu and then select "Create code snippet".
Add the title and the summary for the snippet and add the shortcut to "completion"
Select mutiple words and modify them at the same time
Way:
Select the word you want to search or modify, then press command⌘ + option⌥ + E.
If you want to find more, just hold command and option, then press E again.
Move selected lines
Way:
Select lines(if just one line, you don't need to select)
press command⌘ + option⌥ + [ or ] (move up press [ , move down press ])
Modify mutiple lines at the same time
Way:
press control⌃ + shift⇧ + ↑or↓
Jump by word instead of press too many →
Way:
option + →
留言