SwiftUI Environment Values - What are they? Code Examples | Xcode 13

Published: 19 August 2021
on channel: Sean Allen
16,538
570

In today's video I explain what EnvironmentValues in SwiftUI are and how to use them. EnvironmentValues are a way for the device to communicate some of it's system-wide settings with your SwiftUI app. In the code examples I show you have to use a couple of these EnvironmentValues to adjust your UI to settings like Dark Mode and Dynamic Type.

This video was created on Xcode 13 (beta 5) and macOS Monterey (beta).

Environment Values Documentation:
https://developer.apple.com/documenta...

If you like my teaching or presentation style, I've started creating my own courses:
https://seanallen.teachable.com/

Timestamps
0:00 - What is @Environment?
2:20 - Code Example - Dynamic Type Size
7:05 - Code Example - Color Scheme

Twitter:
  / seanallen_dev  

Link to my book - How I Became an iOS Developer:
https://gumroad.com/l/sean-allen-origin

Hired.com:
https://hired.com/x/1n01g

Check out my podcast, iOS Dev Discussions:
https://itunes.apple.com/us/podcast/i...

Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):

Paul Hudson's Hacking With Swift:
https://gumroad.com/a/762098803

Donny Wals - Combine:
https://gumroad.com/a/909014131

Mark Moeyken’s SwiftUI Books:
www.bigmountainstudio.com/swiftui-views-book/fzc51

Objc.io Books (Thinking in SwiftUI & Advanced Swift):
https://gumroad.com/a/656585843

Ray Wenderlich Books:
https://store.raywenderlich.com/a/208...

Links to my iOS Dev Setup & iOS Dev Book Recommendations
https://www.amazon.com/shop/seanallen

#swift #softwaredeveloper #iosdeveloper


Watch video SwiftUI Environment Values - What are they? Code Examples | Xcode 13 online, duration hours minute second in high quality that is uploaded to the channel Sean Allen 19 August 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 16,538 times and liked it 570 visitors.