您需要查看文件的体系结构。你不能这样放在and@protocol
之间。还有,需要等等。@interface
@end
@protocol
@end
@interface
@protocol SampleProtocolDelegate <NSObject>
// Related to SampleProtocolDelegate
@end
@interface MyProtoco : NSObject
// Related to MyProtoco
@end
您可以拥有各种协议/接口,您只需将它们一个接一个地放置。它们是相同的声明“级别”:
@protocol SampleProtocolDelegate <NSObject>
// Related to SampleProtocolDelegate
@end
@interface MyProtoco : NSObject
// Related to MyProtoco
@end
@protocol SampleProtocolDelegate2 <NSObject>
// Related to SampleProtocolDelegate2
@end
@interface MyProtoco2 : NSObject
// Related to MyProtoco2
@end
@interface MyProtoco3 : NSObject
// Related to MyProtoco3
@end
@protocol SampleProtocolDelegate4 <NSObject>
// Related to SampleProtocolDelegate4
@end
@protocol SampleProtocolDelegate5 <NSObject>
// Related to SampleProtocolDelegate5
@end
用2个协议连续和2个接口来说明“级别”。