Objective-C 的文档生成器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/813529/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Documentation-generator for Objective-C?
提问by Stephen Touset
Is there a generally-accepted documentation generator for Objective-C (similar to RDoc for Ruby)? I've seen Doxygen and ObjcDoc, and am wondering which is most widely used.
是否有普遍接受的 Objective-C 文档生成器(类似于 Ruby 的 RDoc)?我见过 Doxygen 和 ObjcDoc,我想知道哪个使用最广泛。
回答by Barry Wark
Doxygenis probably the most widely used option. Because it's not just for ObjC (doxygen supports many other languages), the development is lively and the community quite strong. HeaderDoc(now an open source project), by comparison appears to have largely stagnated. HeaderDoc only produces HTML output, while doxygen also produces PDF, LaTeX and many other output forms besides HTML. Even Apple seems to recommend doxygen, with thisguide to automatically producing documentation sets, compatible with Xcode's help viewer, from within your Xcode build process.
Doxygen可能是使用最广泛的选项。因为它不仅仅针对 ObjC(doxygen 支持许多其他语言),所以开发很活跃,社区也很强大。相比之下,HeaderDoc(现在是一个开源项目)似乎在很大程度上停滞不前。HeaderDoc 只产生 HTML 输出,而 doxygen 也产生 PDF、LaTeX 以及除 HTML 之外的许多其他输出形式。甚至 Apple 似乎也推荐使用 doxygen,通过本指南从您的 Xcode 构建过程中自动生成与 Xcode 的帮助查看器兼容的文档集。
It's worth noting that doxygen can read HeaderDoc-style comments, so you can write your documentation in HeaderDoc style and decide later whether to produce the final output using doxygen or HeaderDoc.
值得注意的是,doxygen 可以读取 HeaderDoc 样式的注释,因此您可以以 HeaderDoc 样式编写文档,然后决定是使用 doxygen 还是 HeaderDoc 生成最终输出。
回答by ma11hew28
Check out appledoc. It's based on Doxygen. You can see that it eats its own dog food in that it generates the appledoc reference documentationfor the appledoc source code. Compare, for example, GBComment.hto GBCommentClass Reference.
查看appledoc。它基于Doxygen。您可以看到它吃自己的狗粮,因为它为appledoc 源代码生成了appledoc 参考文档。例如,与Class Reference进行比较。GBComment.hGBComment
Also, take a look at Xcode's Documentation Set Guidefor comprehensive instructions on how to create documentation that works with Xcode. These are the instructions that appledoc automates.
此外,请查看Xcode 的文档集指南,了解有关如何创建适用于Xcode 的文档的全面说明。这些是 appledoc 自动化的指令。
回答by Charlie Martin
Doxygen is very widely used. I seem to use it as an SO answer about once a week, too.
Doxygen 的使用非常广泛。我似乎也将它用作每周一次的 SO 答案。
回答by James
回答by Jason Coco
As well as doxygen, apple has a tool the comes with the development tools. It generates the type of documentation you see on things like the SystenConfiguration framework. The tool is called HeaderDoc the documentation can be found in the HeaderDoc User Guide.
除了doxygen,苹果还有一个开发工具附带的工具。它生成您在 SystenConfiguration 框架等方面看到的文档类型。该工具称为 HeaderDoc 文档可以在HeaderDoc 用户指南 中找到。
回答by 0xa6a
Maybe you should try jazzyby Realm. It's an open source project. jazzysupports both Objective-C & Swift.
也许你应该尝试爵士风格的境界。这是一个开源项目。jazzy支持 Objective-C 和 Swift。
"The output matches the look and feel of Apple's official reference documentation, post WWDC 2014." Which you can judge from the sample docit provides.
“输出与 WWDC 2014 后 Apple 官方参考文档的外观和感觉相匹配。” 您可以从它提供的示例文档中判断。

