我刚刚将我的项目迁移到 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() {}
}
输出如下:
Apple 是否更改了此标记的任何内容?苹果的See Also标记格式引用仍将 seealso
显示为有效标注。
最佳答案
(XCode 11, swift 5)
为了澄清这个问题,XCode 似乎可以识别文档注释中的 Markdown 。如果你有类似的东西:
/// # Reference
/// [Link to Reference](https://www.google.com)
它被记录为:
我不知道这是否以与 @seealso
相同的方式 Hook 到文档关键字中,因为 #
markdown 标记仅引用标题样式。为了证明这一点,您可以使用 #
标记向您的文档添加任意部分:
/// # Reference
/// [Link to Reference](https://www.google.com)
/// # Section
/// This is a new section of documentation
/// # Remark
/// New remark
记录为:
关于ios - swift 3 错误 : "See also" callout not showing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40233672/