Skip to content

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
Failed to load latest commit information.
README.md Adding more details about snippet usage to README
async.m Importing first batch of snippets from Xcode
cdfetch.m Fix completion scope.
checkerror.m [Issue #19] Fixing completion scope for CheckError
continuation.m Importing first batch of snippets from Xcode
cvds.m Minor refactoring and reformatting
documents.m Update snippet to use fileURL instead of URL
frame.m Adding frame snippet
frc.m [Issue #32] Adding NSFetchedResultsController snippet
frcd.m Update frcd.m
imv.m [Issue #2] Adding snippets by @twobitlabs
init.m Importing first batch of snippets from Xcode
library.m Further simplifying library snippet
lifecycle.m Add didReceiveMemoryWarning
mailcomp.m Fixing formatting in mailcomp snippet
mark.m Importing first batch of snippets from Xcode
nscoding.m Formatting
nsl.m Update and rename locale.m to nsl.m
pdel.m Minor formatting
pds.m Minor formatting
singleton.m [Issue #21] Renaming shared -> singleton
stack.m [Issue #2] Adding snippets by @twobitlabs
strongself.m Super minor - just fixing some typos in comments
tu.m [Issue #2] Adding snippets by @twobitlabs
tvdel.m Minor formatting
tvds.m add Semicolon
weakself.m Super minor - just fixing some typos in comments
xae.m added snippets for unit testing methods
xaf.m assert false to go with assert true
xan.m added snippets for unit testing methods
xann.m added snippets for unit testing methods
xat.m added snippets for unit testing methods

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.