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
1
vote
2 answers

SwiftUI How to implement dark mode toggle and refresh all views

I'd like to implement a simple toggle to manually switch between dark and light modes. However, I don't know how to make my app refresh (redraw all windows) after I switch the toggle. So far I found these answers Manually set light/dark mode in…
pawello2222
  • 46,897
  • 22
  • 145
  • 209
1
vote
2 answers

I'm trying to implement dark mode in react native

When trying to assign the variable "theme" (which receives the useColorScheme library) as a style, the following error is presented. Error image Light and dark styles were created in styles.js. Github Gist Github project Thank you very much in…
1
vote
1 answer

What is the Dynamic Provider equivalent for UIImages?

We can use dynamic providers to extent UIColor classes and have colors that change immediately to dark and light modes, like this extension UIColor { static var myControlBackground: UIColor { return UIColor { (traits) -> UIColor in …
Duck
  • 34,902
  • 47
  • 248
  • 470
1
vote
1 answer

traitCollectionDidChange never called on UIView subclass

I have a UIViewController that is presented modally by another UIViewController. This UIViewController has a UITableView with a custom UIView set for it's tableFooterView. So the issue I am having is: some colors are not displayed properly when…
Tomer Ciucran
  • 199
  • 1
  • 10
1
vote
1 answer

Is there any method to achieve true Dark Mode in React Native for iOS?

When toggling Dark Mode in iOS, we can see the app previews in the app switcher immediately change their appearances even though suspended in the background. This post aims to find out if it's possible to achieve this in React Native (regardless of…
GlyphCat
  • 144
  • 1
  • 3
  • 15
1
vote
1 answer

iOS Flutter dark mode not changing instantly

I'm not sure if this is a flutter issue, but whenever i change light/dark mode from control center, the theme does not change instantly. Only after dismissing the control center and resume back the app, then it will start to change. I have uploaded…
fadhli-sulaimi
  • 686
  • 12
  • 17
1
vote
0 answers

SVG dark mode styling doesn't work in Safari

Site body dark mode styling works well on both Chrome and Safari for me by CSS variables with prefers-color-scheme. But there is a different situation with logo. I've styled external .svg inside of it with styling for dark mode and light mode, which…
1
vote
1 answer

Show dark mode and light mode side by side in Xcode

Is there a way to show dark mode and light mode side by side in Xcode 11? I'm using UIKit / UIViewControllers. ( Using SwiftUI and previews this can be done but does not apply to UIKit: #if DEBUG struct ContentView_Previews: PreviewProvider { …
Jonny
  • 15,955
  • 18
  • 111
  • 232
1
vote
1 answer

iOS light mode and dark mode

I want to have one feature in my app. I decided to create UIAlertController and 2 AlertAction: Light Mode and Dark Mode. How I can change mode in whole my app by clicking one of my AlertAction. Please Help ....
1
vote
2 answers

How to provide CGColor dynamically when switching dark/light mode?

I've set up a dynamic UIColors for OS13 in my Swift app to handle dark mode. For example: static var background: UIColor { if #available(iOS 13, *) { return UIColor { (traitCollection: UITraitCollection) -> UIColor in if…
Matej Ukmar
  • 2,157
  • 22
  • 27
1
vote
2 answers

Dark mode don't update instantly

I have implemented dark mode in my iOS app, and while it works, the changes don't occur immediately. I think this has to do with the views not recreating themselves all the time like they do in android. For instance, it doesn't work to go out from…
1
vote
4 answers

UIImage with resizableImageWithCapInsets Does Not Respond in Dark Mode

Does anyone know of a way to make a UIImage that has been stretched with resizableImageWithCapInsets respond to changes in light/dark mode? My current implementation only takes into consideration dark/light mode when it is being drawn the first…
Gergely Kovacs
  • 1,045
  • 2
  • 10
  • 28
1
vote
2 answers

Launch Screen Image is not updating for Dark Mode in iOS 13

I have a story board file as the launch screen. I have set image in button background Image. In that image, I have an image set for light and dark mode. but when I switch to dark mode, it always shows light mode image.
user12414721
1
vote
0 answers

iOS 13.x Safari Dark Mode not visible and cannot style them for a web-app

I have a web-app that has a dark background as per client colors. The problem I am having is that when the device is in Dark Mode, the for iOS Safari displays the text from the label in in…
Darren E
  • 31
  • 7
1
vote
2 answers

Should we add two images for dark mode and light mode in ios13

I am bit confused right now, am trying to add support for dark mode for my old application. But I don't understand that if we have to add two images for single asset for both dark mode and light mode. It’s not always the best option to add extra…
Mandeep Singh
  • 2,810
  • 1
  • 19
  • 31