2016-07-28 17 views
-1

我正在关注this答案,以便在swift中记录我的类。我的问题是:有没有办法在xcode中自动创建方法的文档?我的意思是,就像你在php中输入/ ** +进入或者/ /在visual studio中输入一样。xcode:如何自动创建方法文档

回答

0

你的意思是这样吗?

/// Returns the sum of four values 
/// 
/// 
/// - Parameters: 
///  - a: Value 1 
///  - b: Value 2 
///  - c: Value 3 
///  - d: Value 4 
func calculate(a: Double, b: Double, c: Double, d: Double) -> Double { 
    return a + b + c + d 
} 

将返回: enter image description here