Creating a Custom Code Snippet

Extend the scope of the Code Snippet library by creating custom snippets. The Code Snippet library provides a number of useful standard snippets. You can add to this collection by creating your own custom snippets.

 
  1. Open the Code Snippet library.

  2. Select some text in a source file and drag it to the library.

    ../Art/custom_code_snippet_1_of_2_2x.png
  3. Open the new custom snippet, and click Edit.

  4. Give the snippet a name, and click Done.

    ../Art/custom_code_snippet_2_of_2_2x.png

Code snippets let you enter source text with minimum effort. You can drag a standard or custom code snippet into a source file. You can also type a completion shortcut to enter a snippet.

转自:iOS Developer Library

posted @ 2015-05-18 16:19  JonyFang  阅读(124)  评论(0)    收藏  举报