0

I'm trying to document my header files and I really like the concept of alt+click documentation helper. Using code below I can set keywords like @param or @return or @see but unforunately @availability is not being displayed in the proper way.

/**
 * Super method for super feature
 *
 * @param someParameter super cool method parameter
 *
 * @availability Version 3.0 (and later)
 *
 * @return void
 */

availability problem

The question is: how to set availability parameter in documentation helper?

lvp
  • 2,078
  • 18
  • 24

2 Answers2

2

You're looking for @since, not @availability.

For a comprehensive list of commands, see this question.

Community
  • 1
  • 1
Guy Kogus
  • 7,251
  • 1
  • 27
  • 32
0

You need to user NS_AVAILABLE_IOS(5_0) to show the availability.
Here is an example:

/**
 Check whether a file at a given URL has a newer timestamp than a given file.
 Example usage:
 @code
 NSURL *url1, *url2;
 BOOL isNewer = [FileUtils
 isThisFileNewerThanThatFile:url1 thatURL:url2];
 @endcode
 @param index
 The index
 @return the results
 */
- (UIImage*)imageForSectionIndex:(NSUInteger)index NS_AVAILABLE_IOS(6_0){
   // your implem
}
Basheer_CAD
  • 4,908
  • 24
  • 36