From the course: iPadOS 13 Development Essential Training
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Dark Mode overview - iOS Tutorial
From the course: iPadOS 13 Development Essential Training
Dark Mode overview
- [Instructor] Dark mode is one of the other big features of iOS and iPad OS 13. To work with Dark mode, you simply modify the device's settings in the System Settings app. However, you can preview that quickly using Swift UI. In my previews here, I have two ContentView objects and I can go down in there and type a dot and then type environment, and then I need to pass in a key path, which I'll do with a backslash and a dot. And then I need to pass in the key value, which in this case is colorScheme, and then the value will be .dark. So this gives me a Dark preview and if I want a Light preview as well, I can simply copy and paste this line of code for the other preview and then change Dark to Light. I'll zoom out a little bit more so it's easier to see both at the same time. And then I can run the app, or rather get a live preview of the app by hitting the button here, and then I can see that all the user…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.