Xcode Drag and Drop Tricks

You can easily drag/drop a block of code in Xcode by simply marking a block, click and drag. If you look closely, within the editor window there will be vertical bar in the leftmost column that shows the insertion point.

In addition to dragging code about inside the code editor, this is also a quick way to add code to the snippet library. Simply mark, click, drag and drop a block of code onto the snippet library pane (lower right corner of the screen). Obviously, the Utilities view needs to be visible before this maneuver.

  • Related Content by Tag