1,安装 https://github.com/realm/jazzy
[sudo] gem install jazzy
2, 使用VVDocumenter插件编写注释,
安装:https://github.com/onevcat/VVDocumenter-Xcode
其他注释参考:http://nshipster.com/swift-documentation/
3,终端运行:
jazzy --swift-version 2.1.1 --min-acl private | internal | public
-bash: internal: command not found -bash: public: command not found 这两个提醒不用理会。等待编译结束,工程目录下有多出docs文件夹,打开index.html,就可以阅读文档了