2016-07-28 16 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