Cool! Snippets in Xcode

Warren HansenSwifty ThoughtsLeave a Comment

Snippets are a valuable aspect of Xcode that I have not paid much attention to until recently. It’s built right into the IDE and can help you get your work done faster.

I have my own tasks and functions that I use on a regular basis. In the past, I used to keep them stored in Google docs and call them up from wherever I was working… if I could find them. This is a much faster way! To find snippets just look in the lower right of the utilities. Make sure the {} icon is selected.

To create a new snippet, just select the code you want to save and drag + drop to the Snippets pane.

This will generate a  window where you a give it a meaningful name and an autocomplete shortcut…  so cool!

Now the next time you need your custom task, function or class, just start typing the shortcut and Xcode does the rest. so awesome!

 

 

 


Also published on Medium.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.