eonil
eonil

Reputation: 85985

Is there a way to resolve class method dynamically on Objective-C?

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

Answers (3)

Lingol
Lingol

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

g8production
g8production

Reputation: 11

You can use reflection, follow this link: http://www.g8production.com/post/11140358039/objective-c-repleace-resolveclassmethod-and

Upvotes: 1

Jacob Relkin
Jacob Relkin

Reputation: 163258

resolveClassMethod.

Nuff said.

Upvotes: 3

Related Questions