Domanda

In a .h file I have:

@property NSString *foo;

///@description foo sets greatness
-(void)setFoo:(NSString*)foo;

If I call in some .m [myFooObject setFo... it will show me the foo sets greatness description, but if I do myFooObject.foo =... it will not show me the description.

Is there any way to get it to display the description when calling the dot setter?

È stato utile?

Soluzione

I was curious about this too, and Fred McCann's blog at DuckRowing.com finally yielded a result:

/**
    the greatest property ever
*/
@property NSString *foo;

Output:

Output


As a side note, using the @description tag in this block operates in the exact same manner:

/**
    @description the greatest property ever
*/
@property NSString *foo;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top