In my iOS project, I added screenshot images to the documentation of some classes.
The documentation is generated with appledoc.

Basically, for the class TheViewController, this would look like this:

/**
 * A view controller: awesome and helpful class description.
 *
 * **iPhone Screenshot:**
 * ![](../docs/documentation_data/ViewControllersScreenshotsGallery/screenshots/TheViewController_iPhone.png)
 *
 * **iPad Screenshot:**
 * ![](../docs/documentation_data/ViewControllersScreenshotsGallery/screenshots/TheViewController_iPad.png)
 */


Is there any way to DRY this?
A macro, pre-processing (via preprocess-headerdoc?), dynamic placeholder, script, options fed to appledoc?

Ideally, I would like to just have this:

/**
 * A view controller: awesome and helpful class description.
 *
 * SCREENSHOTS_FOR_IPAD_AND_IPHONE
 */




Bonus point if I don't even have to add the line SCREENSHOTS_FOR_IPAD_AND_IPHONE, and the content is only added if some condition is met (ie, if images are found where expected).

有帮助吗?

解决方案

At this time there's no such functionality.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top