Xcode 没有为 Objective-C 代码正确格式化文档注释

Xcode not formatting document comment properly for Objective-C code

我为代码添加了以下带反引号的注释:

/** Checks if the given data is of type `list`. */
+ (BOOL)isList:(id)object {
    // ..
}

但反引号的打印与 Xcode 快速帮助中的一样:

如何让 Xcode 正确显示代码格式?它在记录 Swift 来源时工作正常。

如上面的评论所述,在 Objective-C 文档评论中,您可以使用 @p@c 在 QuickHelp 文档中显示 Typewriter 字体。而 Swift 文档注释接受 Markdown(使用反引号)

虽然这个答案相对较旧,但它仍然在 Objective-C 文档注释中列出了大量可用的选项:

这是一个简短的例子:

/// Here's how to use @c Typewriter @c Font
- (void)myMethod {}

在快速帮助中显示: