Adapter Design Pattern in Swift

Kelvin Tan
Swiftly Engineered iOS
5 min readOct 24, 2023

--

Photo by Call Me Fred on Unsplash

The Adapter design pattern is a structural design pattern that allows objects with incompatible interfaces to collaborate. The pattern enables the conversion of the interface of an existing class to the interface expected by the client class. This allows the client class to use the existing class without changing its code.

In this article, we will explore the Adapter design pattern with an example in Swift.

--

--

Kelvin Tan
Swiftly Engineered iOS

Father, husband, software engineer. Building software and building a family, one line of code and one moment at a time. 🚀💻💙 http://ko-fi.com/kelvintanzy