iPhone - 扩展类委托

时间:2011-01-16 11:49:15

标签: iphone class

好的,我知道如何创建一个类扩展,使用类似的东西:

on .h

@interface UIButton (myExtensionName) 

// my extended methods

@end

然后在.m

@implementation UIButton (myExtensionName)

// my implementations

@end

但是,如何声明我可能创建的扩展代理?

如果这是正常的课程我会做

@protocol myExtensionName <NSObject>
// my delegate declarations
@end

但是如何在课程扩展中这样做?

感谢

1 个答案:

答案 0 :(得分:2)

我不想赞成已在此处发布的答案,所以这是链接:

Defining categories for protocols in Objective-C?