我已经定义了一个Objective-C @类,它在@接口之前的报头中定义了一个内联的@协议。
我无法让appledoc为协议生成文档。是否可以内联,或者协议是否需要是一个单独的文件?
发布于 2013-11-24 18:12:53
协议不需要在单独的头文件中定义。我自己在这样的结构中使用它(相同的头文件):
MyClass.h
/** The `MyClassDelegate` will notify the controller about anything that happens inside `MyClass`
*/
@protocol MyClassDelegate <NSObject>
//Protocol definition
@end
/** This class has some cool methods and properties
*/
@interface MyClass : NSObject
//Class definition
@endhttps://stackoverflow.com/questions/19006453
复制相似问题