2013-09-25 24 views
1

我已经定义了一个Objective-C @class,它在@interface前面的头中定义了一个@protocol inline。如何使用appledoc记录嵌入式协议

我无法获得appledoc来生成该协议的文档。它可能是内联的还是协议需要成为一个单独的文件?

回答

0

该协议不需要在单独的头文件中定义。 我像这样(同一头文件)建筑用它自己:

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 
@end