The @Environment property wrapper in SwiftUI gives access to shared values across your app. Apple provides a wide range of values that are built-in to every app. These cover accessibility, layout, colours, and more. The system automatically updates the built-in environment values so that your app knows more about the environment it is running in.
Lets take a look at examples of the available @Environment values. The best way to explain is by diving into the code.
[Read more…]