Dark Mode in Swift Playground

Hello everyone,

Is it possible to disable Dark Mode in a Swift Playground? I am aware that you can set the Appearance to Light in a regular Xcode project but I can't seem to find the option for that in Swift Playgrounds.

Thank you very much,

Regards

Answered by OscarJunius2411 in 750557022

I seem to have found the solution myself. Setting .preferredColorScheme(.light) on a SwiftUI View disables dark mode.

Accepted Answer

I seem to have found the solution myself. Setting .preferredColorScheme(.light) on a SwiftUI View disables dark mode.

Dark Mode in Swift Playground
 
 
Q