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

Popular posts from this blog

python - rpy2 import is not working -

javascript - How to get MySQL query result returned using $.ajax -

javascript - How to use the code plugin with popcornjs -