search

Home  >  Q&A  >  body text

objective-c - 如何使用NSInvocation调用类方法

可以很方便的通过NSObject
+ (NSMethodSignature *)instanceMethodSignatureForSelector:(SEL)aSelector
方法获取NSMethodSignature
然后通过NSInvocation
+ (NSInvocation *)invocationWithMethodSignature:(NSMethodSignature *)signature
生成NSInvocation

这里只能得到instanceMethodSignature,怎么获取类方法?

PHP中文网PHP中文网2769 days ago442

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-21 10:59:47

    Create a singleton auxiliary object. The instance method a of the auxiliary object calls the class method b, and then obtains the MethodSignature of a

    reply
    0
  • Cancelreply