Objective-C:制作文档

发布于 2024-08-31 21:58:48 字数 235 浏览 3 评论 0原文

我长期以来一直在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

等待我真够勒 2024-09-07 21:58:48

您是否尝试过使用Doxygen?声称支持 Objective-C。甚至还有关于 ADC 的演练

Have you tried using Doxygen? That claims to support Objective-C. There's even a walkthrough on ADC.

生生漫 2024-09-07 21:58:48

还有 AppleDoc 将您的 Doxygen 注释呈现为 Xcode 可用的样式

There's also AppleDoc to render your Doxygen comments into a style usable by Xcode

此生挚爱伱 2024-09-07 21:58:48

您需要 HeaderDoc,这是 Apple 推荐的代码文档。

这是一个例子。

/*!
 This is a method.

 @param    param1    This is first parameter.

 @result
 This method returns nothing.

 @discussion
 This is an example.


 */
- (void)someMethodWithParam1:(NSInteger)param1
{
}

手册: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.

/*!
 This is a method.

 @param    param1    This is first parameter.

 @result
 This method returns nothing.

 @discussion
 This is an example.


 */
- (void)someMethodWithParam1:(NSInteger)param1
{
}

Manual: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/HeaderDoc/intro/intro.html

↙厌世 2024-09-07 21:58:48

正如 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.)

£冰雨忧蓝° 2024-09-07 21:58:48

正如所说,我最喜欢的模式:)

   ///////////////////////////////////////////////////////////////////////
   /// \brief setX
   /// \param x offset of the image.
   /// \return a new image as an QImage.
   /////////////////////////////////////////////////////////////////////////
    QImage  setX(int x);

As a said, my fav pattern :)

   ///////////////////////////////////////////////////////////////////////
   /// \brief setX
   /// \param x offset of the image.
   /// \return a new image as an QImage.
   /////////////////////////////////////////////////////////////////////////
    QImage  setX(int x);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文