gpt4 book ai didi

iphone - Objective C @property 注释

转载 作者:太空狗 更新时间:2023-10-30 03:28:22 26 4
gpt4 key购买 nike

我使用 Doxygen 为我的 Objective-C 代码生成文档。不过到目前为止,我还没有找到任何关于如何正确记录属性的指南。我看过的示例以各种可能的方式进行。有些人自己记录变量,有些人记录@property 声明。一些使用//,而另一些使用完整的/** */ block 。

任何人都可以为我指出最佳实践引用吗?或者也许是关于 future 与 Doxygen 兼容性的一些信息?我想坚持一种模式,至少,一旦他们开发出官方模式,就很容易适应 Doxygen。

最佳答案

我只能说 Core Plot framework使用类似

的格式在实现中注释属性声明
 /** @property myProperty
* @brief Property is very useful
* Useful and there is a lot more to tell about this property **/

它似乎使用 Doxygen 生成干净的文档。来自Core Plot documentation policy :

The @property is required as doxygen cannot find the property name otherwise.

Accessor properties like readonly, copy/retain/assign, and nonatomic are automatically added and should not occur in the manual part of the documentation.

关于iphone - Objective C @property 注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2382142/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com