主页 Xcode Shortcuts
Post
Cancel

Xcode Shortcuts

shortcuts

Preface A collection of shortcuts I’ve accumulated as an iOS and macOS developer.

Toggle the Left Panel

Command

command+0=Show/Hide the left panel

Toggle the Right Panel

Commond Option

command+option+0=Show/Hide the right panel

Toggle the Debug Area

Command Shift Y

command+shift+y=Show/Hide the debug area at the bottom

Jump to a Specific Line

Command Line

command + l (L)=Jump to a specific line. Note: it’s lowercase l, not i.

Collapse/Expand a Function Body

Commond Option Left

command+option+⬅︎=Collapse a function body; ⬅︎ means the left arrow iOS, macOS, Objective-C command+option+➡︎=Expand a function body; ➡︎ means the right arrow

Move Lines Up/Down

Commond Option Move

command + option + {=Move the current line up command + option + }=Move the current line down

Move Lines Left/Right

Commond Move

command + {=Move the current line left command + }=Move the current line right

Find a File Across the Whole Project

Command Shift O

command + shift + o=Move the code line forward; o is an uppercase letter O

Add a Code Comment / Documentation Comment

Commond Option Q

command + option + ?=Automatically add a function documentation comment

Undo/Redo Changes

command + z=Undo command + shift + z=Redo

I’ll keep updating this post as time permits.

The End

该博客文章由作者通过 CC BY 4.0 进行授权。

Access privacy-sensitive data

How to Create Unique Filenames When Creating Files in iOS/macOS