Add links to Swift classes in the quick help documentation comments?

我与影子孤独终老i 提交于 2019-12-09 05:29:38

问题


Assume I have two classes:

/**
  This class should be used together with [Foo]( ??? ).
*/
class Bar {
    func doNothing() {}
}

/**
  Description of what Foo does goes here.
*/
class Foo {
    func doNothing() {}
}

I want to create a link to Foo or Foo's quick help from Bar's quick help in Xcode. Is it even possible? If so, how?

The [name](target) syntax for links isn't up to snuff as far as I can tell by looking at Apple's docs and more Apple's docs.


回答1:


I just stumbled upon this. Apparently, if the text you enclose in backticks happens to be a class, it will be rendered as a hyperlink to the class.



来源:https://stackoverflow.com/questions/43635270/add-links-to-swift-classes-in-the-quick-help-documentation-comments

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