Reputation: 27275
I just upgraded to Xcode 6.3 and it has the Swift 1.2 support. I was loading quick documentation in a swift file for the description
variable as part of the Printable
protocol.
I noticed that the documentation has a nice little inline code block. I'm as of yet unsure if this was there in the previous version of swift and whether it is "special" or they've added more support for features for inline documentation.
Anybody aware of how to do this for my own quick-help?
I believe Obj-c documentation has much more "features" and perhaps as this is part of an Objc protocol thats why the documentation is "fancy"
Update the following:
/**
Test Protocol Definition
Code Block
**BOLD**
*/
Renders as:
Upvotes: 1
Views: 1389
Reputation: 27275
So after some "sleuthing" the closest I could come to for an answer was at: https://developer.apple.com/swift/blog/?id=24
Stylized text is easy to add to your playground by adding special markup to your comments based on the familiar Markdown syntax. Some available styles are headings, bold, italic, lists, bullets, and links to external or bundled resources.
Although the blog post is specifically talking about the new Playgrounds it would appear they have used the same renderer in Xcode to generate quick-doc/quick-help (which is great).
What I've gathered is that the following is supported
The following does not seem to work:
The Playground markdown document is here: https://developer.apple.com/library/prerelease/ios/documentation/Swift/Reference/Playground_Ref/Chapters/MarkupReference.html however as seen above not everything is applicable to inline documentation of code
Upvotes: 1