Property Wrapper

Noun · Development

Definitions

  1. A Swift language feature (declared with @propertyWrapper) that encapsulates custom storage and access logic for a property, enabling reusable patterns like clamping values, lazy initialization, or UserDefaults persistence to be applied via a simple attribute annotation rather than repeated boilerplate.

    In plain English: A reusable Swift annotation that automatically adds behavior — like validation or storage logic — to any property it's attached to.

    Example: "The @Clamped property wrapper ensures the volume level always stays between 0 and 100 without manual validation."

Related Terms