2015-09-15 42 views
2

我實際上正在爲iOS/OSX創建一個框架,並且我想像蘋果一樣記錄我的公共方法。文檔自定義框架XCode

例如,假設我有方法doSomething: ... 我希望收到說明「做一些非常有趣的事情!在XCode的自動完成窗格中的

這是所期望的結果的一個例子:

enter image description here

這是可能的?

回答

5

如果您在代碼中添加具有特定語法的註釋,它將被轉換爲文檔。

閱讀關於NSHipster的文章。

3

你可以在方法聲明中添加文檔註釋

/** 
* Summary of the method. 
* 
* @param firstParam This affects what the method does. 
* @param secondParam And so does this! 
* 
* @return Something very interesting. 
*/ 

Reference