1

I am using markup in documentation comments to create rendered documentation in Xcode's Quick Help Inspector.

In the "Parameters" section of the Quick Help Inspector, the renderer keeps adding a "No description" line for a parameter named "-" even though I have provided a description for all parameters, and there is no parameter named "-".

Here is code:

struct Carrot {
    /**
     Picks carrots.

     - Parameters:
        - qty: how many carrots to pick
        - queue: The dispatch queue on which to run `done`.
        - done: Code to run when done.
     */
    public static func pick(_ qty: Int,
                            queue: DispatchQueue = DispatchQueue.main,
                            done: @escaping ([Carrot]) -> Void) {
        // Code goes here.
    }
}

Screen shot of code, since it matters how my code appears in Xcode:

enter image description here

Here is what the rendered help looks like in Quick Help:

enter image description here

Notice the last entry under "Parameters" section: "No description." How do I fix it?

I thought perhaps this problem is due to no description of the closure input parameter, but if that is the cause, I have been unable to figure out the right syntax to use.

The only documentation I can find on Xcode's doc comment markup is "archived" but still seems to be honored by Xcode 10.2. However, I cannot find anything in those docs to help me fix this problem.

Jeff
  • 3,829
  • 1
  • 31
  • 49
  • https://stackoverflow.com/questions/38669725/how-do-you-document-the-parameters-of-a-functions-closure-parameter-in-swift-3 ? https://stackoverflow.com/questions/47675488/how-to-document-parameters-of-a-closure-thats-a-parameter ? etc. Closure + Documentation + Swift – Larme Jul 11 '19 at 16:28

0 Answers0