Adding protocols for clarity

We've already seen how protocols can be used to improve code by removing complex inheritance hierarchies. You also know how powerful it is when it comes to checking for protocol conformance instead of checking whether a certain object is of a certain type. Let's see how we can improve and future-proof the HelloContacts application by adding some protocols.

We will define two protocols for now: one that specifies the requirements for any object that claims to be able to add a special animation to a view, and one that defines what it means to be able to be displayed as a contact.