Michael Long
1 min readJan 9, 2020

--

Yes. Sort of. Property Wrappers are automatically unwrapped by the compiler to expose their values, so using the value of one as a parameter to a constructor is straightforward.

Use the $ syntax to expose the wrapper and you have access to the internal values of the wrapper and you can pass the wrapper itself (though the wrapper is a struct and as such is a value type).

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet