Reputation: 45921
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.
Upvotes: 2
Views: 1909
Reputation: 1500893
Have you tried using Doxygen? That claims to support Objective-C. There's even a walkthrough on ADC.
Upvotes: 4
Reputation: 6206
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.)
Upvotes: 1
Reputation: 86015
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
{
}
Upvotes: 1
Reputation: 14994
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);
Upvotes: 0
Reputation: 13972
There's also AppleDoc to render your Doxygen comments into a style usable by Xcode
Upvotes: 1