Hi, I have created my iPhone App and i must do a document like javaDoc in java but i don't find anything with google. I think that the comments have similar syntax but i'm not sure. (/* */)
Can you help me? Thanks
Hi, I have created my iPhone App and i must do a document like javaDoc in java but i don't find anything with google. I think that the comments have similar syntax but i'm not sure. (/* */)
Can you help me? Thanks
You can use //
for single line comments, or /* */
for multi-line comments.
You'd also be wise to make use of #pragma mark
to further organize your code. See here: http://cocoasamurai.blogspot.com/2006/09/tip-pragma-mark-organizing-your-source.html
There are also tools like Doxygen: http://www.stack.nl/~dimitri/doxygen/
As Peter said above, there is DOxygen
and then also DOxyClean which cleans it up a bit. More info here: http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
Comments can either be like this
// this is a comment above some line of code
if (foo != 0) {
// do something
}
or like this
/*
// look ma, i'm commenting out a bunch of code
if (foo != 0) {
// do something here
}
*/
or like this
// TODO: i'm marking something that will show up as a To-Do item in XCode's drop down list
and i think there's another one but I can't remember off hand