Code comments
One line and multi-line comments
Within your code base, you can add comments that will be seen in the documentation:
/// One line comment
/*
Multi
line
comment
*/
Shortcut for documentation template
Use the shortcut Option-Command-Slash
while your cursor is on a method name, to produce a documentation template for that method.
DocC
Create a document directory
You can create a DocC documentation directory by right clicking on your project folder, selecting “New File”, and then “Documentation Catalog”
Place it at the same level of your source files, so it will be recognized.
Add articles
Right click on the document director, select “New File” and then select “Article”.
Link to other articles
You can refer to other articles by using the format <doc:MyArticle> where “MyArticle” is the name of the article I want to link to.
Link to code
You can refer to your code by creating links in the format ``MyClass`` where "MyClass" is the name of the class you want to link to.
Add images
Add images into the “Resources” folder in the document directory.
Then you can refer to the images by name using the format:  where “MyScreenShot” is the name of the resource.
Build the documentation
From the Xcode menu, you can click on “Product” and then “Build Documentation”.
The keyboard shortcut is Control-Shift-Command-D
.