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

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -