1

@interface の前のヘッダーで @protocol インラインを定義する Objective-C @class を定義しました。

プロトコルのドキュメントを生成するためのappledocを取得できません。インラインで可能ですか、それともプロトコルを別のファイルにする必要がありますか?

4

1 に答える 1

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
于 2013-11-24T10:12:53.440 に答える