Protocol and Delegate

Photo by Siora Photography on Unsplash

Here, I am going to tell a story about how to pass data between two viewControllers through Delegate.

A delegate is an object that acts on behalf of, or in coordination with, another object when that object encounters an event in a program.