Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
C# to Objective C by example #6
// Documentation.
// The defacto for objective-c is DOxygen, much like C++ and C. Its syntax
// is straight forward, just like .NET you use a triple comment line '///' (or /* */)
// and use various tokens like 'param' and 'return'. These can start with
// a '\' or '@' like javadoc. There's no summary token, you simply start
// with '///' and that is your summary. The documentation goes in the .h.
// There is a good Mac OS X DOxygen GUI that produces HTML for you.
// http://www.codeproject.com/KB/tips/doxysetup.aspx
// http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
// Example:
/// \param title The title of the person
/// \param firstName The person`s firstname
/// \return A new name based on the title and firstName
/// Retrieves a new name based on the provided title and firstname
-(NSString*) exampleDocumentation : (NSString*) title : (NSString*) firstName;
//-------------
-(NSString*) description
{
// This is similar to overriding ToString() in .NET for console/string.format output.
// NSLog displays the description property, which this method is used to retrieve its value - its definition is in NSObject.
// Also available is debugDescription
return @"person class";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.