Today, we have more choices on architecture of iOS app including Apple’s MVC, MVVM…
Do you remember our system structure for car? We have a protocol and different implements like the code below.
protocol Car { func drive()}
class Sedan: Car { func drive() { print("drive a…
class Sedan: Car { func drive() { print("drive a
Decorator is a structural pattern to add new functions to class or instance at runtime. Compared to inheritance, it has more advantages in flexibility and scalability. We will still use our car model in this article.