ios - One protocol, used by many classes -
I understand how a class can be tailored to several protocols, but where and how do I define a protocol Which can be called in many sections, i.e.
_delegate.doStuff
can appear in many sections.
in encode,
file-> new file-> Objective-Protocol
@protocol myProtocolName - (zero) doStuff; @end
Then in the sections you want to implement this protocol
... #import "myProtocol.h" @ interface aclass & lt; MyProtocolName & gt; ...
You can add it to any class.
Comments
Post a Comment