Reputation: 77596
I get the following error: Class is not an objective c class name
- (void)CallStaticMethodForClass :(Class *)myClass
{
[myClass doSomething];
}
+ (void)doSomething
{
//
}
Upvotes: 1
Views: 2483
Reputation: 243146
It should be declared as:
- (void)callMethodOnClass:(Class)myClass { ...
A couple things:
*
) is unnecessary when referring to a Class
. Command-double click "Class
" to see why (it's part of the typedef
)Upvotes: 7