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.
Type /// or /** */ to begin a documentation comment and then use DocC's special dialect of Markdown to write the content. This dialect supports many keywords like - Parameters: for describing function arguments or - Returns: for describing return values.
Swift comments can be written in two formats: Each line is preceded by a triple slash (///) Javadoc-style block comments (/** … */)
There are two ways to add comments in Swift: // - Single Line comments. /*... */ - Multiline Comments.
You can use ⌥ + ⌘ + / (option + command + ) to add function documentation.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With