سؤال

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