Property Wrappers in Swift — Part 2

Previous article covered basics and need for property wrappers. In this article, we will focus on accepting and supporting multiple properties for property wrappers.

In this example, we will design a property wrapper which will allow us to add discount to DevTechie online video course sale. As we know that, discount value can’t be below 1%(no point of having discount 😂) and it can’t be above 100% so we will design property wrapper which will constrain discount to be between 1 and 100.