I know the directive for a protocol is @protocol just like @selector, but what is the "type" for referencing a Protocol (eg. SEL for @Selector)? In MacOSX stack, it's Protocol *?
You reference it as:
id<TheNameOfTheProtocol> aVariableToThatProtocol;
Or if a message wants a (Protocol *)
object:
[myObject conformsToProtocol:@protocol(TheNameOfTheProtocol)];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With