Questions tagged [ios-darkmode]

In macOS and iOS (13.0 and later), users can choose to adopt a system-wide light or dark appearance. The dark appearance, known as Dark Mode, implements an interface style that many apps already adopt. Users choose the aesthetic they prefer, and can also choose to toggle their interface based on ambient lighting conditions or a specific schedule.

All iOS/Mac apps should support both light and dark interface styles, but might perform better with a specific appearance in some places.

271 questions
19
votes
4 answers

Change UIDatePicker selected Date text Color for Dark mode (iOS 13)

Having trouble to find out a solution for changing the color of text for the selected Date in iOS 13 dark mode. I know how to change the color of the text of a UIPicker view using code self.timePicker.setValue(UIColor.black, forKeyPath:…
A K M Saleh Sultan
  • 2,403
  • 2
  • 22
  • 28
18
votes
2 answers

SwiftUI: Force View to use light or dark mode

Is it possible in SwiftUI to force a View to use light or dark mode — like overrideUserInterfaceStyle in UIKit does?
ixany
  • 5,433
  • 9
  • 41
  • 65
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
16
votes
5 answers

Launch Images for Dark or Light Mode

How can I choose a different set of Launch images for Dark mode and for Light mode? I have a LaunchImages set. When the application starts, an image is shown. For Light mode it seems good, however if I try to open my application on a device set to…
gerram
  • 520
  • 6
  • 12
15
votes
3 answers

How can I check ios device's current userInterfaceStyle programmatically?

I am able to get userInterfaceStyle using TraitCollection of any view or ViewController ie. Dark or Light. But when I forced app to use Dark or light Mode, then I want to know what is the current userInterfaceStyle of iOS device irrespective of…
Raushan Kumar
  • 171
  • 1
  • 2
  • 6
14
votes
3 answers

Is there a keyboard shortcut to switch between dark mode and light mode in iPhone simulator?

I'm using iPhone simulator for my development and most of the ui components are written using swift. Is there an easy way to switch between dark mode and light mode for testing purpose? I find the enabling and disabling dark mode from settings very…
14
votes
1 answer

SKStoreKitReviewController and Darkmode

Is there any way to alter the colors/tint of an SKStoreKitReviewController? When I am modifying my apps to support DarkMode, when in dark mode, the presented viewController does not look good.
Stewart Lynch
  • 875
  • 9
  • 26
14
votes
4 answers

UILabel in UITableViewCell in .xib file ignores Dark Mode

I have my custom UITableViewCells in .xib files. Since Xcode 11 Beta 5 (also tested with Beta 6) my UILabels ignore the Dark Mode and the text is always black. I have set the UILabel text color to Default (Label Color) so this should change…
patrickS
  • 3,590
  • 4
  • 29
  • 40
14
votes
2 answers

Detect if iOS13 Dark Mode is enabled from Flutter/Dart

I'm writing a Flutter app for Android and iOS which will change its style/theme based on iOS' Dark Mode status. Is there currently anything like a MediaQuery.isDarkModeEnabled in Flutter? There is a GitHub issue open here but the Flutter team must…
iron59
  • 555
  • 2
  • 5
  • 12
13
votes
3 answers

How to detect Light\Dark mode change in iOS 13?

Some of the UI setups not working automatically with the Dark/Light mode change as the UIColor. For example shadow in layer. As I need to remove and drop shadow in dark and light mode, I need somewhere to put updateShadowIfNeeded() function. I know…
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278
13
votes
1 answer

UITabBar / UITabBarItem and iOS 13's Dark Mode

In our app, we use custom UITabBarItem dynamically (see below) programmatically. We use ImageAssets to get the dark/light right images. But it doesn't work at 100% : if we restart the app, it's fine. If iOS switch to dark mode and the app is…
Didier
  • 141
  • 2
  • 6
12
votes
3 answers

Flutter how to get brightness without MediaQuery?

My goal is to create an app where the user can choose his preferred theme. I'm saving the user's choice with shared preferences so I can load it the next app start. The user can either select: - Dark Mode (Independent from the OS Settings) - Light…
Just A Question
  • 423
  • 6
  • 21
12
votes
4 answers

UITextField placeholder text is unreadable in iOS13 dark mode

UITextField has a .placeholder text property, for showing info before text has been added to the field, up until now it's always been clear and visible, but in iOS13 dark mode was introduced and now placeholder text is practically unreadable in a…
Albert Renshaw
  • 17,282
  • 18
  • 107
  • 195
11
votes
5 answers

Why doesn't my iOS app disable dark mode?

So ... I've tried to set my app to disable iOS 13 dark mode by forcing light mode according apple documentation, in the emulator all attempts work fine, but when I try on the real device, nothing happens, it's like I've never changed my code First…
Fogaiht
  • 113
  • 1
  • 1
  • 6
10
votes
2 answers

How to change theme style (User Interface Style) immediately in Swift in iOS 13

I'm using Swift 5.1 and Xcode 11.1 and I've currently finished implementing Dark Mode design. App has setting where user can set display theme(Light, Dark, System Default) and currently it's working fine if app restarts after user selects theme(I…
Ioan Moldovan
  • 2,272
  • 2
  • 29
  • 54
1
2
3
18 19