Objective-C:制作文档
我长期以来一直在使用 Visual Studio 和 C# 进行开发。现在,我正在使用 XCode 和 Objective-C 进行开发。
在 C# 上,我可以使用 ///
生成文档。 XCode 上是否有类似的机制来生成文档?以及我应该使用什么样的注释?谢谢。
I've been developing for Visual Studio and C# for a long time. Now, I'm developing with XCode and Objective-C.
On C# I can use /// <summary>
to generate documentation. Is there any kind of mechanism like that on XCode to generate documentation? And what kind of comments should I use?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您是否尝试过使用Doxygen?声称支持 Objective-C。甚至还有关于 ADC 的演练。
Have you tried using Doxygen? That claims to support Objective-C. There's even a walkthrough on ADC.
还有 AppleDoc 将您的 Doxygen 注释呈现为 Xcode 可用的样式
There's also AppleDoc to render your Doxygen comments into a style usable by Xcode
您需要 HeaderDoc,这是 Apple 推荐的代码文档。
这是一个例子。
手册:http://developer.apple。 com/library/mac/#documentation/DeveloperTools/Conceptual/HeaderDoc/intro/intro.html
You need HeaderDoc which is recommended by Apple for code documentation.
Here's an example.
Manual: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/HeaderDoc/intro/intro.html
正如 Jon Skeet 所说,最流行的方法是 Doxygen,据我所知,注释格式基本上可以与 AppleDoc 互操作。
另请务必查看 Fred McCann 编写的评论生成器插件:
http://www.duckrowing。 com/2011/05/14/using-the-doxygen-helper-in-xcode-4/
他还有一篇很棒的如何编写 Doxygen 评论的帖子:
http://www.duckrowing。 com/2010/03/18/documenting-objective-c-with-doxygen-part-i/
(这作为对乔恩答案的评论会更好,但可惜我没有要点。)
As Jon Skeet said, the most popular method is Doxygen, and from what I can tell so far, the comment formatting is basically interoperable with AppleDoc.
Also be sure to check out the comment generator plugin that Fred McCann wrote:
http://www.duckrowing.com/2011/05/14/using-the-doxygen-helper-in-xcode-4/
He also has a great how-to post for writing Doxygen comments:
http://www.duckrowing.com/2010/03/18/documenting-objective-c-with-doxygen-part-i/
(This would be better as a comment to Jon's answer, but alas I don't have the points.)
正如所说,我最喜欢的模式:)
As a said, my fav pattern :)