The parameters of a block in Swift shows up with a table for parameters of the block if you add markup for documentation but I can not figure out how to fill out this table. I have searched for it in the Xcode markup reference formatting but I couldn't find anything on it.
Example:
/**
Foo
- parameter completion: A block to execute
*/
func foo(completion: (Bool) -> Void) {
// do something
}
This is what shows up if I option + click
in Xcode on the function above to view documentation:
Apple's APIs show the completion block parameter table filled out. This is an example of a CloudKit API documentation view:
You have to give a name to the parameter, but precede it with an underscore: