How can I announce a class method in protocal? I have tried like this:
@protocal
+(void)methodA;
@end;
but this leads to crash.
How can I announce a class method in protocal? I have tried like this:
@protocal
+(void)methodA;
@end;
but this leads to crash.
If your intent is to specify a class method that conforming classes must implement, then, yes, you can define class methods in your protocol requirements.
But your protocol needs a name. And @protocol
was misspelled.
@protocol ProtocolNameHere
+(void)methodA;
@end