A few code snippets from my Xcode arsenal
Objective-C Mercury
Latest commit a15a6f2 May 29, 2015 @mattt mattt Merge pull request #53 from cojoj/patch-1
Add YAML front matter
Permalink
Failed to load latest commit information.
README.md Adding more details about snippet usage to README Nov 1, 2011
async.m Converting snippets into new format with YAML front-matter Mar 29, 2015
cdfetch.m Converting snippets into new format with YAML front-matter Mar 29, 2015
checkerror.m Converting snippets into new format with YAML front-matter Mar 29, 2015
continuation.m Converting snippets into new format with YAML front-matter Mar 29, 2015
cvds.m Converting snippets into new format with YAML front-matter Mar 29, 2015
documents.m Converting snippets into new format with YAML front-matter Mar 29, 2015
frame.m Converting snippets into new format with YAML front-matter Mar 29, 2015
frc.m Converting snippets into new format with YAML front-matter Mar 29, 2015
frcd.m Converting snippets into new format with YAML front-matter Mar 29, 2015
imv.m Converting snippets into new format with YAML front-matter Mar 29, 2015
init.m Converting snippets into new format with YAML front-matter Mar 29, 2015
library.m Converting snippets into new format with YAML front-matter Mar 29, 2015
lifecycle.m Converting snippets into new format with YAML front-matter Mar 29, 2015
mailcomp.m Converting snippets into new format with YAML front-matter Mar 29, 2015
mark.m Converting snippets into new format with YAML front-matter Mar 29, 2015
nscoding.m Converting snippets into new format with YAML front-matter Mar 29, 2015
nsl.m Converting snippets into new format with YAML front-matter Mar 29, 2015
pdel.m Add YAML front matter May 21, 2015
pds.m Converting snippets into new format with YAML front-matter Mar 29, 2015
singleton.m Converting snippets into new format with YAML front-matter Mar 29, 2015
stack.m Converting snippets into new format with YAML front-matter Mar 29, 2015
strongself.m Converting snippets into new format with YAML front-matter Mar 29, 2015
tu.m Converting snippets into new format with YAML front-matter Mar 29, 2015
tvdel.m Converting snippets into new format with YAML front-matter Mar 29, 2015
tvds.m Converting snippets into new format with YAML front-matter Mar 29, 2015
weakself.m Converting snippets into new format with YAML front-matter Mar 29, 2015
xae.m Converting snippets into new format with YAML front-matter Mar 29, 2015
xaf.m Converting snippets into new format with YAML front-matter Mar 29, 2015
xan.m Converting snippets into new format with YAML front-matter Mar 29, 2015
xann.m Converting snippets into new format with YAML front-matter Mar 29, 2015
xat.m Converting snippets into new format with YAML front-matter Mar 29, 2015

README.md

Xcode Snippets

Just a few code snippets I have in my Xcode arsenal. In dotfiles fashion, I thought it'd be cool to put these out in the ether.

Using Snippets

In Xcode 4, open a workspace and toggle the right sidebar to be visible. On the bottom, there is a panel with four icons in the header. Click on the { } icon to open the Code Snippets Library.

Now copy-paste the code from one of these snippets, highlight the code block you just pasted and drag it to the Code Snippet panel. Make sure to match the suggested platform, language, and completion scope. The completion shortcut corresponds to the filename of the code snippet.