Using Code from the Code Snippet Library

Add frequently-used source code to your project by using a snippet from the Code Snippet library.

bullet
To add code from the Code Snippet library
  1. With a source file open, click the Code Snippet library button.

  2. Select a code snippet.

  3. Drag the snippet to the source file.

    The screenshot illustrates using a code snippet to add an init method to the implementation of an Objective-C class.

    ../Art/code_snippet_2x.png../Art/code_snippet_2x.png

The system-supplied snippets in the library are designed to speed development and help ensure code integrity. You can also create custom code snippets.