joan
joan

Reputation: 2531

How to add visual documentation to a method

I want to add the following documentation to a method:

/*! @discussion
   Creates a new tab

           ___    ___
 _________| + |__| 1 |__
                        |
                 |      |
                710     |
                       748

 */

The problem is that when tab the method (pressing the Option key) all I get is:

enter image description here

As you can see all the drawing is get lost because line returns are not respected. There is any way to save "drawings" on the documentation?

Upvotes: 2

Views: 31

Answers (1)

joan
joan

Reputation: 2531

ok, I realized how to add drawings on the documentation: Just nest your "drawing" with @code and @endcode pragmas like this:

/*! @code
   Creates a new tab

           ___    ___
 _________| + |__| 1 |__
                        |
                 |      |
                710     |
                       748
 @endcode

Then, if you click your method(with Option key) you get the correct picture:

enter image description here

Upvotes: 2

Related Questions