1

Possible Duplicate:
How to create documentation for instance variable and methods in Xcode?

Eclipse-based editors such as PDT and Eclipse allow you to automatically add code hints for your custom code by using a special commenting syntax. Is there anyway you can add these code hints to your custom code in XCode?

Community
  • 1
  • 1
amateur barista
  • 4,440
  • 3
  • 25
  • 37

1 Answers1

-1

I think you're looking for the code snippet library. The shortcut key is [control][option][command]2

The code snippet library will appear in the lower-right corner of the window.

You can select some code on your screen and drag it to the Code Snippet Library. This will create a new code snippet called "My Code Snippet" which will likely appear at the bottom of the list. You can single click the new snippet to view it in a pop-up. From there, you can click the edit button to make the snippet more useful.

For place-holders, use <# text #>. For example, <#height#> would produce a placeholder labeled height.

Use the field called "Completion Shortcut" for the text you want to type in order to activate the snippet.

When you're done editing the snippet, click the done button and start typing your Completion Shortcut text to test it out.

Jeff Wolski
  • 6,332
  • 6
  • 37
  • 69