Back to Browse

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

20.5K views
Aug 19, 2021
8:24

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/documentation/swiftui/environmentvalues If you like my teaching or presentation style, I've started creating my own courses: https://seanallen.teachable.com/?video=S3DVAGQX0kI Timestamps 0:00 - What is @Environment? 2:20 - Code Example - Dynamic Type Size 7:05 - Code Example - Color Scheme Twitter: https://twitter.com/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/ios-dev-discussions-sean-allen/id1426167395?mt=2 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/20866/link/1 Links to my iOS Dev Setup & iOS Dev Book Recommendations https://www.amazon.com/shop/seanallen #swift #softwaredeveloper #iosdeveloper

Download

1 formats

Video Formats

360pmp415.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

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