> Design Patterns > Mediator > Mediator Design Pattern In Swift

Mediator Design Pattern In Swift

Mediator design pattern in Swift for controlling the interaction between different objects.


Mediator design pattern In Swift

Output

ConcreteColleague2::ReceiveMessage()...Message = I am colleague1
ConcreteColleague1::ReceiveMessage()...Message = I am colleague2


Suresh Kumar Srivastava is founder of online learning site coursegalaxy.com and author of popular books C In Depth, Data Structures Through C In Depth. He has 18+ years experience in industry and worked on architecture and design of multiple products. This article Mediator Design Pattern In Swift is from his Design Patterns course.