Questions tagged [uiuserinterfacestyle]
12 questions
17
votes
5 answers
How to generate a dynamic light/dark mode UIImage from Core Graphics?
iOS 13 introduced UIImage instances that auto-adopt to the current UIUserInterfaceStyle (aka light or dark mode). However, there seem to be only methods to construct such images from named or system images (imageNamed:inBundle:withConfiguration: or…

Ortwin Gentz
- 52,648
- 24
- 135
- 213
5
votes
3 answers
How to handle black colored content image for dark mode in my iOS App?
I am giving support for iOS dark mode in my iPad App throughly. The issue is only for dark mode when brand logo image is having black color. Generally, all brand logo are never white colored, so there is no issue for light mode.
Here are the…

NSPratik
- 4,714
- 7
- 51
- 81
3
votes
2 answers
How to use Light UIUserInterfaceStyle image version in Dark Mode?
I use image, this image has two versions for light and dark UIUserInterfaceStyle, but I need to use the image light version in one UIViewController when Dark Mode is on. I know I can use tintColor, but I want to find out if other ways to do this.

Alexander Khitev
- 6,417
- 13
- 59
- 115
2
votes
0 answers
Use overrideUserInterfaceStyle on all active windows
I have appearance settings in my app that look like that:
func changeInterfaceStyle(to mode: UIUserInterfaceStyle) {
guard let window = view.window else { return }
UIView.transition(with: window, duration: 0.5, options:…

Arainty
- 91
- 9
1
vote
1 answer
Is it possible to manually set / toggle the UserInterfaceStyle / Dark Mode per App?
I have updated my iOS 11+ to support Dark Mode when being used on iOS 13. This works fine when the UserInterfaceStyle / Dark Mode is enabled or disable in the device settings.
However, I would like to give users the option to activate / deactivate…

Andrei Herford
- 17,570
- 19
- 91
- 225
0
votes
1 answer
borderColor of a UIButton doesn't respect overrideUserInterfaceStyle
I ran into an issue I'm having trouble explaining. I have a simple UIButton for which I set the following properties:
class SecondaryButton: AppButton {
override func awakeFromNib() {
super.awakeFromNib()
cornerRadius =…

CristianMoisei
- 2,071
- 2
- 22
- 28
0
votes
1 answer
Swift Navigation Bar not change userInterfaceStyle on scoll
I have a problem when I try to change interface style (dark or light). If I set dark mode I get the navigation bar remains light when I scroll. If I set light mode the navigation bar becomes black. How can I solve this?
I use this code to change…

TheCesco1988
- 280
- 1
- 2
- 10
0
votes
0 answers
Is it possible to overwrite the value of UIUserInterfaceStyle at any given point?
I'm working on a react-native app on which I want to detect how many people have dark mode and how many people have light mode but I want to keep light mode as UIUserInterfaceStyle.
So since I'm just detecting I tried a couple of solutions but the…

Chaudhry Talha
- 7,231
- 11
- 67
- 116
0
votes
1 answer
DarkMode UIUserInterfaceStyle key in info.plist for ios 13 below versions
I have set force lite mode (Opting out of dark mode) by the following code writes in info.plist
UIUserInterfaceStyle
Light
I'm trying to submit IOS application to an apple store for review process. Is there any problem for ios 13 below…

SoftDev
- 277
- 1
- 3
- 13
0
votes
1 answer
Custom Dark Mode iOS Issue
Three enums are set to achieve:
UIUserInterfaceStyleUnspecified -> To listen to iOS setting mode change
UIUserInterfaceStyleLight -> To override LIGHT mode irrespective of iOS setting mode
UIUserInterfaceStyleDark -> To override DARK mode…

nvn
- 21
- 2
-1
votes
1 answer
How can I detect when the system changes dark/light mode in Swift?
I know there are plenty of answers pointing to traitCollectionDidChange, but that is going to be called when the userInterfaceStyle of a view controller changes, and I would like to let the user select between System, Light and Dark mode, so I am…

CristianMoisei
- 2,071
- 2
- 22
- 28
-1
votes
1 answer
Submit apple store for review DarkMode UIUserInterfaceStyle key in info.plist
I have set force lite mode (Opting out of dark mode) by the following code writes in info.plist
UIUserInterfaceStyle
Light
I'm trying to submit IOS application to an apple store for review process. Is there any problem to upload the application?

SoftDev
- 277
- 1
- 3
- 13