1

I have defined an Objective-C @class that defines a @protocol inline in the header before the @interface.

I can't get appledoc to generate the docs for the protocol. Is it possible inline or does the protocol need to be a separate file?

retrodev
  • 2,323
  • 6
  • 24
  • 48

1 Answers1

0

The protocol doesn't need to be defined in a separate header file. I'm using it myself in a construction like this (same header file):

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
Leijonien
  • 1,415
  • 14
  • 16