[英]Perform class method on Class object
I've got an instance of the Class
class, obtained by calling the class
method (example below). 我有一个Class
类的实例,可以通过调用class
方法获得(下面的示例)。 With that instance i'd like to call a class ( + ..
) method on that. 对于那个实例,我想在其上调用类( + ..
)方法。
Callee 被呼叫者
Class foo = [FooBar class];
SEL selector = @selector(doSomething:)
// Call somehow?
FooBar Definition FooBar定义
@implementation FooBar
+ (void)doSomething:(id)argument { .. }
@end
Is there any way of doing this? 有什么办法吗?
Thanks. 谢谢。
Class foo = [FooBar class];
[foo doSomething];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.