Swift
closure in Xcode 8
?closure
parameters
?closure
return type
?Example:
struct S1 {
/// This block is executed after completion
var completion : (String, Int) -> (Bool)
}
Xcode 8
has built in functionality to add documentation to custom code.
This can be done, by doing one of the following:
Command
+ Option
+ Click
on code
Keep cursor on code and Editor
> Structure
> Add documentation
If those tags are not supported for the given location the only possible workaround seems to be right now:
struct S1 {
/// description
///
/// __returns__
/// blah blah
///
/// __parameters__
/// blah blah
var completion : (String, Int) -> (Bool)
}