I have set up different backgrounds for ' Light/Dark Appearance '
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.
FYI: I'm switching between Light/Dark mode using Interface Style option.
Can someone please advice what I'm missing on? It's all new to me.
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
I think it's an Xcode (latest version) bug.
If you run it on your phone, you won't have this problem. Meaning settings are correct.
In Simulator it's working fine. One can confirm by toggling the Appearance from feature menu of the simulator.
这似乎是一个 Xcode 错误,但是当您尝试在模拟器或物理设备上运行它时,假设您处于黑暗模式,它应该可以完美运行。
The Xcode Bug is still here, Xcode storyboard appearance switcher does not work, it only works in the simulator.
You can change the simulator device appearance: Settings> Developer> Dark Appearance.
Happy coding.
On my physical device iPhone 8 iOS 14.6 dark Mode doesn't work. traitCollectionDidChange not get called after switching to dark mode. On my iPhone 12 iOS 15.x, and some testers it works. No Solution i tried worked. Also i got some other weird UI bugs aswell on my iPhone 8.
Hope its just an Xcode Bug.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.