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 without registration, duration hours minute second in high quality. This video was added by user Sean Allen 19 August 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 16,538 once and liked it 570 people.