Question:
- What is the correct format to add documentation (using built in functionality not 3rd party) to a custom
Swiftclosure inXcode 8? - Could you provide the Apple documentation link to refer ?
- How to specify the
closureparameters? - How to specify the
closurereturn type?
Example:
struct S1 {
/// This block is executed after completion
var completion : (String, Int) -> (Bool)
}
Note:
Xcode 8 has built in functionality to add documentation to custom code.
This can be done, by doing one of the following:
Command+Option+Clickon codeKeep cursor on code and
Editor>Structure>Add documentation
Reference:
Workaround:
If those tags are not supported for the given location the only possible workaround seems to be right now: