---
title: "Discussion on \"What is the Decorator pattern and how is it used in Swift?\" | Hashnode"
description: "Discussion on \"What is the Decorator pattern and how is it used in Swift?\". I faced a unique problem recently when I was trying to make modifications to some legacy code. I was tasked with adding a small extra feature on top of a class that was first implemented probably 10 years ago. \nAll I had to do was go to the class def..."
url: "https://hashnode.com/posts/decorator-pattern-in-swift/6248b7db4b4dde0dc0be7528"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is the Decorator pattern and how is it used in Swift?](https://pavanpowani.hashnode.dev/decorator-pattern-in-swift?utm_source=hashnode&utm_medium=feed)

I faced a unique problem recently when I was trying to make modifications to some legacy code. I was tasked with adding a small extra feature on top of a class that was first implemented probably 10 years ago. All I had to do was go to the class def...

Apr 2, 2022 · 7 min read · pavanpowani.hashnode.dev  
Updated May 13, 2022  
Read the article

-   [#swift](https://hashnode.com/tag/swift)
-   [#ios](https://hashnode.com/tag/ios)
-   [#ios-app-development](https://hashnode.com/tag/ios-app-development)
-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#design-and-architecture](https://hashnode.com/tag/design-and-architecture)

## Written by

[Pavan Powani](https://hashnode.com/@pavanpowani)

@pavanpowani · Berlin

  
[View profile](https://hashnode.com/@pavanpowani)

iOS Engineer @ momox

## Responses 1

Markdown supported · ⌘↵ to post

[Waheed Afolabi](https://hashnode.com/@flexingSwift)

[May 23, 2022](https://hashnode.com/posts/decorator-pattern-in-swift/6248b7db4b4dde0dc0be7528/comment/628be22fb4bd016fc9a2f4a5)

Concise. Clear. Thanks.
