Beginner Swift
Q40 / 100

What does @propertyWrapper do?

Correct! Well done.

Incorrect.

The correct answer is B) Defines a reusable wrapper type that adds behavior to stored properties via the wrappedValue contract

B

Correct Answer

Defines a reusable wrapper type that adds behavior to stored properties via the wrappedValue contract

Explanation

@propertyWrapper struct Clamped<T> { ... } allows @Clamped(0...100) var progress: Int. SwiftUI uses @State, @Binding, @Published as property wrappers.

Progress
40/100