Swift 3 error: “See also” callout not showing

谁说胖子不能爱 提交于 2020-12-28 13:19:30

问题


I just migrated my project into swift 3 and found that "see also" callout to the quick help is not showing. Everything was perfectly working in previous version of swift. Below is my code

/**
 Adds a See also callout to the Quick Help for a symbol using the See Also 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() {}
}

And the output is like

Did Apple change anything with this markup? But the doc it's still showing the same.


回答1:


Replace seealso by # Reference




回答2:


(XCode 11, Swift 5)

For clarification on this question, it appears that XCode recognizes markdown in documentation comments. If you have something like:

/// # Reference 
/// [Link to Reference](https://www.google.com)

It gets recorded as:

I don't know that this hooks into the documentation keywords in the same way that @seealso does, because the # markdown tag just refers to a header style. To demonstrate this point, you can add arbitrary sections to your documentation using the # tag:

///  # Reference
///  [Link to Reference](https://www.google.com)
///  # Section
///  This is a new section of documentation
///  # Remark
///  New remark

Gets recorded as:



来源:https://stackoverflow.com/questions/40233672/swift-3-error-see-also-callout-not-showing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!