5

I'm using HeaderDoc to document my code and I would like to link to other methods in the documentation. I'm not trying to generate HTML (at least for now) but I do want it to appear in Xcode's right panel. The following is the documentation for -applicationDidEnterBackground: as it appears in Xcode. I want to achieve those blue links referencing other methods I wrote myself:

enter image description here

The docs say to use @link, but it doesn't seem to work:

Here's what I tried:

/**
 *  @abstract   Returns an array with a copy of all elements in the heap in sorted order.
 *
 *  @discussion The original heap remains unchanged. This getter uses Heap Sort which takes O(n log n),
 *              although it copies the heap first (in linear time). If losing the elements on the heap is
 *              acceptable you should use @link -removeAllObjectsWithArray: @/link instead, which is faster.
 */

Here's the result:

enter image description here

As you can see it's not rendering properly. I read here that @link is broken, but the comment dates back to 2013. Is there a fix? Am I doing it wrong?

Edit: I tried Santa's suggestion, this is the result:

/**
 *  @abstract   Whether the heap is empty.
 *
 *  @discussion An empty heap contains no objects, in which case this property returns <code>YES</code>.
 *              Returns <code>NO</code> otherwise, which also implies that calls to {@link count}
 *              return zero.
 */

Renders as:

enter image description here

Community
  • 1
  • 1
André Fratelli
  • 5,920
  • 7
  • 46
  • 87

0 Answers0