Link Reference
Add a named reference to a URL that can be used in multiple places.
Works with:
✓ Playgrounds
✓ Symbol documentation
Syntax
[text to display]: URL "hover title"
The Link Reference statement sets the specified text as a reference to the specified URL with the specified hover title. The Link Reference statement is not appear in the rendered playground or in Quick Help.
Text to display is the text to display in the comment.
URL is the address to open when the link in the comment is clicked.
Hover title (optional) is the text displayed in a playground when the pointer is hovering over the image. It is also used for accessibility.
Playground Example
/*: Setup and use a link reference.
[The Swift Programming Language]: http://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/ "Some hover text"
For light reading we suggest [The Swift Programming Language].
For more information, see [The Swift Programming Language].
If you are not sure, please see [The Swift Programming Language].
*/
Quick Help Example
/**
An example of using a *link reference*
[The Swift Programming Language]: http://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/ "Some hover text"
For light summer reading we suggest [The Swift Programming Language].
### Useful books
* [The Swift Programming Language]
*/
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2017-06-05