草庐IT

someMethodImplementation

全部标签

ios - 如何获取类方法的选择器?

我有下一段代码,我在其中获取指向实例方法的指针:#import#import@interfaceTestClass:NSObject@end@implementationTestClass-(void)someMethod{//Thisisinstancemethod,it'sokayNSLog(@"Hellofromsomemethod!");}@endintmain(intargc,constchar*argv[]){typedefvoid(*MethodWithoutParams)();MethodWithoutParamssomeMethodImplementation=cla