1

我已经定义了一个Objective-C @class,它在@interface 之前的标题中定义了一个@protocol 内联。

我无法让 appledoc 为协议生成文档。是否可以内联或协议是否需要是一个单独的文件?

4

1 回答 1

0

该协议不需要在单独的头文件中定义。我自己在这样的结构中使用它(相同的头文件):

我的类.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
@end
于 2013-11-24T10:12:53.440 回答