我刚刚将我的项目迁移到 Swift 3,发现快速帮助中的“另请参阅”标注没有显示。在 Swift 的早期版本中,一切都运行得很好。下面是我的代码:
/**
Adds a "See also" callout in the Quick Help for a symbol using the `seealso` delimiter. Multiple "See also" callouts appear in the description section in the same order as they do in the markup.
- author: Tapas Pal
- remark: Use the callout to add references to other information.
- seealso: [The Swift Standard Library Reference](https://developer.apple.com/library/prerelease/ios//documentation/General/Reference/SwiftStandardLibraryReference/index.html)
*/
class SeeAlsoMarkup: NSObject {
static func doSomething() {}
}
输出如下:
苹果对这个标记做了什么改变吗?苹果See Also https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/SeeAlso.html标记格式参考仍然显示seealso
作为有效的标注。
(XCode 11、Swift 5)
为了澄清这个问题,XCode 似乎可以识别文档注释中的 markdown。如果你有类似的东西:
/// # Reference
/// [Link to Reference](https://www.google.com)
它被记录为:
我不知道这是否以与文档关键字相同的方式挂钩@seealso
确实如此,因为#
markdown 标签只是指标题样式。为了证明这一点,您可以使用以下命令向文档中添加任意部分:#
tag:
/// # Reference
/// [Link to Reference](https://www.google.com)
/// # Section
/// This is a new section of documentation
/// # Remark
/// New remark
记录为:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)