In Xcode 8 beta and Swift 3, when you have a method that takes a closure as a parameter, for example:
func foo(bar: (String) -> Void) {
bar("Hello, world")
}
How do you document the parameters the closure takes? For example, if I wrote this:
/// Calls bar with "Hello, world"
/// - parameter bar: A closure to call
func foo(bar: (String) -> Void) {
bar("Hello, world")
}
Then the quick help looks like this:
I would like to know what the syntax is that will allow me to write some text to replace "No description." Many thanks!
See Question&Answers more detail:os