Protocol in swift

In Swift, delegates are implemented using a protocol declaration For example, if you have two classes, a parent and a child: class Parent { } class Child { } And if you want to notify the Parent,  a change from Child, you would use protocol: Create A Protocol: protocol ChildDelegate { func childDidSomething() } In the child class we need…