Reputation: 4009
Is it possible to auto-generate a documentation template for a given method in XCode?
Example of a documentation template:
///
/// - parameter x:
/// - parameter y:
/// - parameter w:
/// - parameter d:
/// - returns: T
Corresponding to this method:
func subface(x: CGFloat, y: CGFloat, w: CGFloat, d: Int) -> UIImage{
// ...
}
Upvotes: 2
Views: 972
Reputation: 6824
Add VVDocumenter-Xcode via Alcatraz Package Manager.
this is an example after writing
///
above the function definition.
/**
<#Description#>
- parameter x: <#x description#>
- parameter y: <#y description#>
- parameter w: <#w description#>
- parameter d: <#d description#>
- returns: <#return value description#>
*/
func subface(x: CGFloat, y: CGFloat, w: CGFloat, d: Int) -> UIImage{
/*...*/
}
The
<# .. >
marked sections are editable with just tapping over them.
Upvotes: 7