Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A few code snippets from my Xcode arsenal

branch: master
Octocat-spinner-32 README.md Adding more details about snippet usage to README November 01, 2011
Octocat-spinner-32 async.m Importing first batch of snippets from Xcode November 01, 2011
Octocat-spinner-32 cdfetch.m Fix completion scope. October 18, 2013
Octocat-spinner-32 checkerror.m [Issue #19] Fixing completion scope for CheckError September 05, 2013
Octocat-spinner-32 continuation.m Importing first batch of snippets from Xcode November 01, 2011
Octocat-spinner-32 cvds.m Minor refactoring and reformatting September 05, 2013
Octocat-spinner-32 documents.m One-lining documents snippet September 27, 2013
Octocat-spinner-32 frame.m Adding frame snippet November 15, 2013
Octocat-spinner-32 frc.m [Issue #32] Adding NSFetchedResultsController snippet November 20, 2013
Octocat-spinner-32 frcd.m Fix indents. November 13, 2013
Octocat-spinner-32 imv.m [Issue #2] Adding snippets by @twobitlabs January 26, 2013
Octocat-spinner-32 init.m Importing first batch of snippets from Xcode November 01, 2011
Octocat-spinner-32 library.m Further simplifying library snippet November 15, 2013
Octocat-spinner-32 lifecycle.m Fix indentation February 14, 2014
Octocat-spinner-32 mailcomp.m Fixing formatting in mailcomp snippet November 15, 2013
Octocat-spinner-32 mark.m Importing first batch of snippets from Xcode November 01, 2011
Octocat-spinner-32 nscoding.m Formatting October 25, 2013
Octocat-spinner-32 nsl.m Update and rename locale.m to nsl.m April 17, 2013
Octocat-spinner-32 pdel.m Minor formatting April 05, 2014
Octocat-spinner-32 pds.m Minor formatting April 05, 2014
Octocat-spinner-32 singleton.m [Issue #21] Renaming shared -> singleton September 05, 2013
Octocat-spinner-32 stack.m [Issue #2] Adding snippets by @twobitlabs January 26, 2013
Octocat-spinner-32 strongself.m Remove &* from strongSelf August 21, 2013
Octocat-spinner-32 tu.m [Issue #2] Adding snippets by @twobitlabs January 26, 2013
Octocat-spinner-32 tvdel.m Minor formatting September 05, 2013
Octocat-spinner-32 tvds.m Minor reformatting September 05, 2013
Octocat-spinner-32 weakself.m Update weakSelf to remove redundant referencing April 25, 2013
Octocat-spinner-32 xae.m added snippets for unit testing methods October 09, 2013
Octocat-spinner-32 xaf.m assert false to go with assert true October 09, 2013
Octocat-spinner-32 xan.m added snippets for unit testing methods October 09, 2013
Octocat-spinner-32 xann.m added snippets for unit testing methods October 09, 2013
Octocat-spinner-32 xat.m added snippets for unit testing methods October 09, 2013
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.

Something went wrong with that request. Please try again.