Dark Mode

I'm currently (obviously) building an app and I decided I prefer the dark mode theme more than default. Is there any way I could set it so that dark mode is the default color of the app?

Accepted Reply

You can set it with .preferredColorScheme(.dark).

  • Clutch! Do I put this under NavView the view?

  • You can. Don’t have my code open now but it affects itself and it’s children views so that should work. I also have a spot for the user to choose so on that child view it only affects that view.

Add a Comment

Replies

You can set it with .preferredColorScheme(.dark).

  • Clutch! Do I put this under NavView the view?

  • You can. Don’t have my code open now but it affects itself and it’s children views so that should work. I also have a spot for the user to choose so on that child view it only affects that view.

Add a Comment