Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dark mode does not switch to a Dark mode background in Xcode

I have set up different backgrounds for 'Light/Dark Appearance'

enter image description here

But when switching between Light/Dark mode within Xcode, my background always uses image from 'Any/Light Appearance'. Only colours set for icons changes accordingly.

enter image description here

FYI: I'm switching between Light/Dark mode using Interface Style option.

enter image description here

Can someone please advice what I'm missing on? It's all new to me.

like image 907
marika.daboja Avatar asked Mar 27 '20 01:03

marika.daboja


People also ask

How do I change to dark mode in SwiftUI?

To enable dark mode on a Simulator, go to Settings → Developer and toggle Dark Appearance.

How do I enable dark mode in iOS Swift?

You can opt dark mode as per UIViewcontroller or UIView by setting overrideUserInterfaceStyle property to dark otherwise in Xcode 11 the by default it is dark.

How do I turn off dark mode in Xcode?

iOS Simulator can toggle between light and dark mode with ⌘ - command + ⇧ - shift + a shortcut. Views from both view controllers change simultaneously.


2 Answers

I think it is an Xcode bug. You can confirm it by changing your setting in the iOS Simulator.

Go to Settings -> Developer -> Dark Appearance

like image 71
Ikhsannul Hijri Avatar answered Oct 09 '22 03:10

Ikhsannul Hijri


I think you might need to uncheck the Resizing checkbox and set the Scales property to Single Scale. It worked for me.

enter image description here

like image 11
2rahulsk Avatar answered Oct 09 '22 03:10

2rahulsk