Search code examples
xcodecode-snippetsxcode10

Adding code snippet in Code Snippet Library (Xcode 10)


Recently when I was using Xcode 10 beta 3, I tried to make a code snippet and add it to the code snippet library.

But the drag drop cannot be done as the code snippet library is detached in Xcode 10, and hides when I click on a code.

How to add code snippet in code snippet library in Xcode 10?


Solution

  • After some time found out.

    Select the code you want to add to library. Right-click on it and click on Create Code Snippet from the pop-up menu.

    Apparently upto Xcode 9.x.x, this option was not there.

    enter image description here