0

I'm writing a UIKit library which need a lot of documentation.

I've added the documentation as regular in every library but it's not showing up within the quick help.

Example:

import UIKit

/// An extension of Apples [`UILabel`](https://developer.apple.com/documentation/uikit/uilabel).
///
/// The whole label is configurable within the storyboard builder using the`@IBInspectable`.
///
///     let myLabel = MyLabel()
///
@IBDesignable
open class MyLabel: UILabel {
}

All I get here is: enter image description here

If reorder the documentation to:

/// An extension of Apples [`UILabel`](https://developer.apple.com/documentation/uikit/uilabel).
///
/// The whole label is configurable within the storyboard builder using the`@IBInspectable`.
///
///     let myLabel = MyLabel()
///

import UIKit

@IBDesignable
open class MyLabel: UILabel {
}

Or

import UIKit

@IBDesignable
/// An extension of Apples [`UILabel`](https://developer.apple.com/documentation/uikit/uilabel).
///
/// The whole label is configurable within the storyboard builder using the`@IBInspectable`.
///
///     let myLabel = MyLabel()
///
open class MyLabel: UILabel {
}

I at least I see: enter image description here

But nothing of my written documentation. Method or field documentation seem to work properly.

How to I correctly write class documentation? Has this something todo with ?@IBDesignables other classes seem to work fine?

I've tried it in Xcode 9.x.x and Xcode 10.0 beta.

Jazzy does export everything properly.

1 Answer 1

1

Remove the Grave accents (`) in the first line of your comment. Xcode doesn't seem to support that within links! If you remove them, your quick help will be rendered.

Instead of

/// An extension of Apples [`UILabel`](https://...)

use

/// An extension of Apples [UILabel](https://...)
Sign up to request clarification or add additional context in comments.

2 Comments

You are the man! It only doesn't render if the ` are within the link. Please edit your answer with an example which works and which not so it's more clear. Thank you very much!
Like it that way?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.