【问题标题】:How to add multiline comment in HeaderDoc如何在 HeaderDoc 中添加多行注释
【发布时间】:2014-09-18 16:35:54
【问题描述】:

这是我的代码

/**
 *    In touchesBegan: it is considered if it was succesfull click. Automatically changes on/off images
 */
@interface WOC_OnOffImageButton : SKSpriteNode

当我在 Description 内的弹出窗口中按 alt 键单击 WOC_OnOffImageButton 时,我会在一行中看到 In touchesBegan: it is considered if it was succesfull click. Automatically changes on/off images

我想在... click. Automatically... 之间换行,因为这样更容易阅读。

问题
有没有可能,如果有,怎么做?

【问题讨论】:

  • 是的,我试过了,我尝试了 \n,
    并且有变体,但没有奏效。 :-(
  • 您是否尝试在两行之间插入一个实际的换行符?你在说哪个弹出窗口? Xcode 自动完成弹出窗口无法显示多行 cmets。

标签: ios objective-c documentation headerdoc


【解决方案1】:

是的,AppleDoc 支持多行 cmets。以下是您如何使用它们:

 /**
 *    In touchesBegan: it is considered if it was succesfull click.
 *
 *    Automatically changes on/off images
 */

关键是在新行上加上星号。您可能需要保存 (Cmd+S) 和/或清理 (Cmd+Shift+K) 项目才能在弹出窗口中查看结果。

【讨论】:

  • Cmd+Shift+K必须,否则它不起作用。有没有办法减少弹出描述符上的行之间的空格?我只想要一行接一行。中间没有那么多空白。
  • 这是一个旧答案,但需要澄清(在 xCode 9.3 中测试),两行文本之间必须有一个空行才能使文本出现在新行中(* - 星号不是必须的)
猜你喜欢
  • 2011-05-28
  • 1970-01-01
  • 2011-10-01
  • 2011-12-31
  • 1970-01-01
  • 2020-03-27
相关资源
最近更新 更多