Just a few code snippets I use in Xcode.
In Xcode 4, open a project and ensure that the right side bar is visible by selecting the right most option of the “view” pane in the top right corner of Xcode. Now that the right bar is available, click on the { } option of the bottom most pane. This will bring up the snippet library.
The way you add a new snippet is to write out a code snippet, highlight it and drag it into the Code Snippet Library window. Once you drag the code into the library, it creates a default snippet called “My Code Snippet” which you modify to match the suggested platform, language, and completion scope. To add dynamic fields insert <#Text#>, where "Text" is whatever you find most convenient.