Dynamically invoke a class method in Objective C

后端 未结 4 1845
感情败类
感情败类 2020-12-08 04:09

Suppose I have Objective C interface SomeClass which has a class method called someMethod:

@interface SomeClass : NSObject {
}

         


        
4条回答
  •  再見小時候
    2020-12-08 04:41

    Is this built-in method what you want?

    id objc_msgSend(id theReceiver, SEL theSelector, ...)
    

    (See the runtime reference docs for this function.)

提交回复
热议问题