mercredi 11 avril 2018

Can we bind a class to have only implementation of in interface defined in protocol in swift 4?

I am implementing solid principle and for that reason, I want every class file will implement interface from any specific protocol only.

Moral: I want to restrict class to introduce new function by their own and it can only implement function mention in protocol.

if it need new function it should come only via protocol.

Aucun commentaire:

Enregistrer un commentaire