xcodeheaderdoc

Xcode documentation comment syntax


I was wondering if someone could explain what/if there is any difference between the following two comment syntax in Xcode.

/**
 * comments
 */

/*!
 * comments
 */

It seems like both allow Xcode to display your comments as documentation but I'm not sure if there is a difference between the two.


Solution

  • They are functionally equivalent. /*! is a HeaderDoc style opener and /** is a JavaDoc style opener commonly used by doxygen. Xcode 5 supports both HeaderDoc and doxygen/JavaDoc formats.