0

How can I announce a class method in protocal? I have tried like this:

@protocal
+(void)methodA;
@end;

but this leads to crash.

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

0

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
Rob
  • 415,655
  • 72
  • 787
  • 1,044