【问题标题】:Not getting appledoc to document NS_ENUM没有让 appledoc 记录 NS_ENUM
【发布时间】:2014-03-26 10:07:31
【问题描述】:

在记录我的 typedef NS_ENUM 时,有人可以解释我做错了什么吗?

这是我的语法:

/** The different menu items
 */
typedef NS_ENUM(NSInteger, kMenuItem) {
    /** The start page */
    kMenuItemStartPage = 0,
    /** The new round item */
    kMenuItemNewRound,
    /** The archive item */
    kMenuItemArchive,
    /** The participants item */
    kMenuItemMyParticipants,
    /** The locations item */
    kMenuItemMyLocations,
    /** The settings */
    kMenuItemSettings,
    /** The contact page */
    kMenuItemContact,
    /** The count */
    kMenuItemTotal
};

/**
 * This is the Menu View Controller.
 *
 * The menu view controller handles the menu the menu and its options. You can access the menu view controller using the `menuContainer` in the `ApplicationDelegate`
 *
 */
@interface MenuTVC : UITableViewController


@end

我的运行脚本构建阶段:

APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
echo "Generating docs!";
$APPLEDOC_PATH \
--project-name "${PRODUCT_NAME}" \
--project-company "Sogeti Sverige AB" \
--company-id "se.domain.project" \
--output "Docs" \
--no-install-docset \
--exit-threshold "2" \
--keep-undocumented-objects \
--keep-undocumented-members \
--keep-intermediate-files \
--ignore "Pods" \
--ignore ".m" \
--index-desc "${PROJECT_DIR}/Readme.md" \
${PROJECT_DIR}/Prevent
else
echo "AppleDoc not found or installed!"
fi;

结果:

构建结果:

从终端:

$ which appledoc
/usr/bin/appledoc
$ appledoc --version
appledoc version: 2.2 (build 963)

我就是想不通。

提前致谢!

【问题讨论】:

    标签: objective-c enums appledoc


    【解决方案1】:

    我刚刚发现枚举记录在index.html 文件中,而不是类文档本身。

    确实有效。

    【讨论】:

    • 是的,Apple 就是这样做的。 Appledoc 旨在模仿 Apple 的文档。枚举不属于任何类,因此它们不在您的类定义文档中。
    • 这就是我今天学到的 =) 我只是没想到它在那里,无论我尝试了什么,当我刷新“类”页面时,它没有记录它[那里]......现在我知道为什么;)
    【解决方案2】:

    Appledoc 目前不支持枚举。容我们说,这是一个很受欢迎的功能请求:

    https://github.com/tomaz/appledoc/issues/2

    【讨论】:

    • 它确实支持它,我只是在 index.html 中发现它,但在类文档中预期它。
    • 但枚举并不是真正的类的一部分。它们只是经常在同一个文件中声明。
    • 是的,理想情况下它们应该单独声明。
    • 感谢您的更新。自从我上次看到这个之后,事情一定已经发生了变化!
    • @PaulPeelen 它可能只支持它们作为常量列表?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-02
    • 2023-02-14
    • 1970-01-01
    • 2012-04-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多