EsbenB EsbenB - 1 year ago 113
Objective-C Question

automatically insert header doc comments in Objective C?

Since XCode 5 now supports reading header comments directly from header files, it has become increasingly interesting, to document functionality in a consistent way.

I therefore try to find a tool that can automatically insert header doc comments in Objective C header files, but can't seem to find one?

Basically I would like a took that could write something like:

<desc method.>
@param parmA
<desc of parmA>
@param parmB
<desc of parmB>
<desc of result>
- (CO2 *)doSomething:(typeName)parmA withSomething:(typeName)parmB;

Answer Source

I found this very handy Xcode plugin to write all the default comment code for you.


As of Xcode 8, there is a new shortcut available that has the same behaviour as the VVDocumenter plugin.

Place the cursor above any function, class, struct,... and hit ⌘ + ⌥ + /

This will generate a comment accordingly to where you placed the cursor.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download