阅读背景:

是否可以在Objective-C中动态实现协议?

来源:互联网 

I know that I can extend a class (for example a framework class) using categories, but is it possible to have a class for which you do not control the source code implement one of your custom protocols? I not only want to have it respond to certain messages if sent to an instance, but also, ideally, want objects of that class to return true on runtime type checks when querying for the protocol.I know that I can extend a class (for example a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: