Search code examples
xcode4

How do you populate the Xcode 4 "Option+Click" popover?


In Xcode 4, if you option + click on a keyword, then the said keyword will appear in a popover with a bunch of descriptive information, like so:

enter image description here

However, when I option + click on my own method or variable, all I get is a link to the file in which the object was declared:

enter image description here

How is this done? Can I take advantage of this for my own code?

(I've noticed in some of the framework headers, that there is some sort of special comment syntax. Could that be related?)


Solution

  • You must create your own "documentation set" for your API. Search Xcode's documentation for "Documentation Set Guide" and dig in. The "Documentation Sets" section of the guide specifically states that Quick Help uses this.

    With a doc set in place, not only will this popup find the description but it will be available in the QuickHelp in the Utility pane as well as the documentation browser in the Organizer.