bemeyer
bemeyer

Reputation: 6221

Class documentation not showing up in Xcode

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.

Upvotes: 0

Views: 456

Answers (1)

Herr der Töne
Herr der Töne

Reputation: 178

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://...)

Upvotes: 1

Related Questions