Reputation: 85985
I can define and resolve dynamic method without any errors or warnings with @property
, @dynamic
and -resolveInstanceMethod:
However, they're instance methods, but I want to resolve class method dynamically. How can I archive this?
Upvotes: 2
Views: 2270
Reputation: 1
For those who worried about warning "Method definition not found", here is how to fix it:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincomplete-implementation"
@implementation PBCodingCaseInt
......
@end
#pragma clang diagnostic pop
Upvotes: 0
Reputation: 11
You can use reflection, follow this link: http://www.g8production.com/post/11140358039/objective-c-repleace-resolveclassmethod-and
Upvotes: 1