开发者

iPhone - extending a class delegate

开发者 https://www.devze.com 2023-02-04 06:48 出处:网络
OK, I know how to create a class extension, using something like that: on .h @interface UIButton (myExtensionName)

OK, I know how to create a class extension, using something like that:

on .h

@interface UIButton (myExtensionName) 

// my extended methods

@end

and then on .m

@implementation UIButton (myExtensionName)

// my implementations

@end

But how do I declare the extended delegates I may create?

If this was a normal class I would do

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

but开发者_StackOverflow how do I do that on a class extension?

thanks


I do not want to take credit for an answers that already got posted here, so here's the link :

Defining categories for protocols in Objective-C?

0

精彩评论

暂无评论...
验证码 换一张
取 消