In AppCode, you can generate and view documentation for your Swift and Objective-C code. For Objective-C, you can add HeaderDoc, Doxygen, and appledoc comments and generate full-fledged documentation in various formats using corresponding tools. For Swift, the Markdown syntax is available for code documentation formatting.
Place the caret before the declaration of a method or function that you want to document and do the following:
For Objective-C: depending on the comment style you want to use, type
/*!and press ⏎:
For Swift: type
///and press ⏎.
Place the caret at the symbol you want to view documentation for and press ⌃Q. If the symbol is supplied with proper documentation comments or SDK documentation, the Quick Documentation popup appears:
If you want documentation to be shown in a tool window, press ⌃Q twice. Press ⌃Q twice to switch between the popup and tool window modes.
If you want documentation to be shown on mouse hover, select the Show quick documentation on mouse move checkbox in .
While renaming a function or its parameters, the documentation comments need to be updated accordingly. In case of the Rename refactoring ⇧F6, AppCode updates documentation comments along with other references.
Basic typing assistance for documentation comments is provisioned by AppCode auto-complete feature: