目前窿祥,很多第三方庫都支持使用AppleDoc創(chuàng)建對應(yīng)的API文檔。你可以到第三方庫的github頁面去了解其是否支持appledoc以及相關(guān)的doc生成命令蝙寨。
安裝appledoc
//在terminal中輸入
git clone git://github.com/tomaz/appledoc.git
cd ./appledoc
sudo sh install-appledoc.sh
//安裝完成后晒衩,驗證下是否成功
appledoc --version
生成文檔
1. 先去github下載第三方庫的源碼。(git clone XXX.git)
2. cd到第三方庫所在目錄墙歪。
3. 在terminal中執(zhí)行生成doc的命令听系。下面以AFNetworking為例(命令都可以對應(yīng)的github頁面上找到)
appledoc --project-name="AFNetworking" --project-company="AFNetworking" --company-id="com.afnetworking.afnetworking" AFNetworking/*.h
4. 然后就可以用dash查看文檔了。