我正在使用 HeaderDoc 来记录我的代码,并且我想链接到文档中的其他方法。我不想生成 HTML(至少现在是这样),但我确实希望它出现在 Xcode 的右侧面板中。以下是-applicationDidEnterBackground:
Xcode 中出现的文档。我想实现那些引用我自己编写的其他方法的蓝色链接:
文档说要使用@link
,但它似乎不起作用:
这是我尝试过的:
/**
* @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.
*/
结果如下:
如您所见,它没有正确渲染。我在这里读到它@link
坏了,但评论可以追溯到 2013 年。有修复吗?我做错了吗?
编辑:我尝试了圣诞老人的建议,结果如下:
/**
* @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.
*/
呈现为: