很久没有管理这个blog了,些许空虚。不知道今天的回归可否坚持。简单介绍一个第三方注释 -- appledochtml
安装过程:git
1. git clone git://github.com/tomaz/appledoc.gitgithub
2. cd appledocxcode
3. sudo sh install-appledoc.shmarkdown
安装完成。剩下的就是运行。app
运行就是一句代码,就是有些啰嗦的一句话:spa
appledoc --project-name name --project-company "company" --company-id bundleIdentifier --output 输出路径 要处理的文件夹路径code
实例:htm
appledoc --project-name appleDocTest --project-company "test" --company-id com.test.appledocTest --output /Users/xxxx/Desktop/ /Users/xxx/Documents/appledocTest/Utils blog
--project-name 项目名称
--project-company 公司名称
--company-id 公司id
--output 输出的路径(只是输出一个txt的说明文档)
要生成注释的类的路径
还有一句简单点的操做
appledoc --output ./doc --project-name name --project-company "company" --company-id bundleIdentifier
appledoc --output ./doc --project-name testAppledoc --project-company "test" --company-id cn.test.testAppledoc
这样docset 默认集成在xcode中,在源码中按住option再单击就能够调出相应方法的注释。
如需获取其余参数使用 appledoc --help
OK ,差很少就是那么简单。你要生成html的样子? 好吧 知足你:
appledoc --no-create-docset --output ./doc --project-name name --project-company "company" --company-id bundleIdentifier
参考连接:https://github.com/tomaz/appledoc/blob/master/Readme.markdown
补充一下:鉴于这个注释须要一个特定的格式,推荐https://github.com/onevcat/VVDocumenter-Xcode, 直接git clone 或者Download zip,运行xcode工程后,重启xcode,而后在方法名前 输入/// 就能够看到自动完成的注释样式了。很好用的说。