The standard way, as @DiegoPalomar suggested, is to use HeaderDoc, Apple's own tool for embedding structured comments in source code.
It comes with Xcode, so no installation required. It comes with a command-line script that generates HTML output of your documentation.
Docs for HeaderDoc:
- Introduction
- HeaderDoc command-line tool
- HeaderDoc markup
Here's an example:
/*!
* Takes in a number and adds 4 to it.
*
* @param myNumber a number of type NSInteger.
*
* @return The number with 4 added to it.
*/
- (NSInteger)addFour:(NSInteger)myNumber {
return myNumber + 4;
}
Big plus: when you alt-click on your documented method, your doc appears in the balloon:
HeaderDoc is open-source too: http://www.opensource.apple.com/source/headerdoc/