In the attached image Xcode is showing usage hints (two lines at the bottom) for its classes. Similarly, is that possible to have my own hints for my custom class methods and properties?
You do this by adding a specifically formatted comments above the declaration in your header. e.x:
/**
* This is my awesome new property!!!
*/
@property (strong, nonatomic) NSObject *someProperty;
/**
* An even cooler description!
*
* @param string some string
* @param arr some array
*/
- (void)myAwesomeMethodWithAweomseParamOfType:(NSString *)string andOtherParam:(NSArray *)arr;
Then when I head over to my implementation file and start typing...
However, if you don't want to bother remembering all the specifics of how to format these comments, download VVDocumneter from github. It's a Xcode plugin that will automatically add these comments. All you have to do is navigate to the line above the declaration, and hit ///
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With