The Apple docs for Delegation state:
In both Swift and Objective-C delegation is often expressed with a protocol that defines the interaction and a conforming delegate property
I'm not sure of any other way to create delegates that don't "have to" involve a protocol. Is there another way of expressing delegation in Swift or Objective-C that doesn't involve a protocol?
Aucun commentaire:
Enregistrer un commentaire