Massimo Polimeni
Massimo Polimeni

Reputation: 4906

Comment tag @code doesn't work with properties

I'm documenting my Objective-C code for the Quick help function in Xcode like this:

enter image description here

but I have a little problem in documenting the properties: it's possibile use the tag @code ?

Because this comment doesn't work:

/** 
 the URL base for backend APIs
 @code
 codeexample;
 @endcode
*/
@property (nonatomic, strong) NSString *baseUrl;

but this works:

/** 
 the URL base for backend APIs
*/
@property (nonatomic, strong) NSString *baseUrl;

Maybe @code tag can not be used with properties? Or I'm doing something wrong?

Upvotes: 0

Views: 78

Answers (1)

bgilham
bgilham

Reputation: 5939

That style of documentation doesn't work with properties, only methods. That's why @psobko's example works and your doesn't. They documented a method definition.

Upvotes: 1

Related Questions