Learn Courses My Dashboard

Just finished IOS Foundations!

What an excellent course, I love that the modules each build something functional, but then build something new on the skills of the previous modules.

As I was going through the City Sights App, I realized that I prefer my phone on dark mode, but the apps should be able to toggle between it -

I found this code example to detect which mode and plan to set a variable in the app where my design considerations can go conditionally against it.

@Environment(\.colorScheme) var colorScheme

This will set a variable with the color scheme name.

I really enjoyed this course and am looking forward to the Database course next!

Thank you CWC staff and Chris specifically.

Karl

Congrats Karl!!
You actually don’t need to do that at all! If you create a color in the assets folder, you can set two colors for light and dark mode and then just call that in your app. The color will automatically adjust properly to the environment :slight_smile:

Thank you