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
6
votes
1 answer

Custom cell in UITableView not working properly in iOS 13 Dark Mode

I have used, since 2011, Objective-C code for my medical application, which basically has 5 tabs with associated UITableViews, 3 of which use custom cells. Initially with using Dark Mode I found that the custom cells did not change to Dark Mode…
user183804
  • 531
  • 1
  • 8
  • 21
6
votes
1 answer

UIColor dynamic provider block receives wrong userInterfaceStyle sometimes

I have a bunch of colors that I'm updating to support the new iOS 13 dark mode. I'm using them programmatically, with the new dynamic provider block constructor. The problem here is that sometimes the block is called with the wrong value for the…
Yuri Reis
  • 131
  • 6
6
votes
1 answer

iOS dark mode - image assets not redrawn

I'm implementing the dark mode for iOS. The problem occurs with the images: I've opened the Assets.xcassets and changed the "appearances" "to Any, Dark" Of course I've added the new image. Unfortunately the images are not being redrawn when…
izik461
  • 1,131
  • 12
  • 32
5
votes
1 answer

Is there a way to observe a change between Dark and Light mode on iOS using Notifications instead of the standard Delegate function?

The standard way to check for a change between Dark and Light modes on iOS is with a view-level delegation function: override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { …
Ethan Allen
  • 14,425
  • 24
  • 101
  • 194
5
votes
1 answer

Change ASAuthorizationAppleIDButton style dark/light mode is turned on

I have a sign in apple button. It has style .black in light mode: let button = ASAuthorizationAppleIDButton(type: .signIn, style: .black) I want it to have style .white in dark mode Accessing the style to change it does not seem possible like…
regina_fallangi
  • 2,080
  • 2
  • 18
  • 38
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
5
votes
1 answer

How use dark mode and different resolution assets images in flutter?

I use in my flutter project images with different resolutions as its described here. Now I want to add custom images for dark mode theme. My assets declaration in pubspec.yaml look like this: flutter: uses-material-design: true assets: -…
Szamot
  • 366
  • 2
  • 12
5
votes
2 answers

Possible to reload app when dark/light mode changes?

My app makes extensive use of CAGradientLayers which apparently do not automatically update their colors when dark/light mode is switched. They will update their colors when the app is closed and reopened though. Im aware i can use the following…
Alec Barton
  • 197
  • 2
  • 11
5
votes
2 answers

Google maps marker snippet not supporting iOS Dark mode

Google maps iOS SDK doesn't seem to take care of the new Dark mode. Having issue with white background/white label: While regular light mode is working as expected: Any known work-arounds?
Alexander
  • 452
  • 6
  • 15
5
votes
1 answer

System blur style before iOS 13.0 warning when using material style in storyboard

I'm trying to adapt my app to iOS 13 dark mode, and when I set a UIVisualEffectView's blur to any of the new modes (like material) in Storyboard I get the warning: System blur style before iOS 13.0 I understand that, as well as I can use version…
danqing
  • 3,348
  • 2
  • 27
  • 43
5
votes
2 answers

iOS13: How to specify color for elevated user interface level in the asset catalog

iOS 13 brings us UIUserInterfaceLevel, which can be either .base or .elevated. The system seems to automatically adjust colors provided to UIView when the elevated level is used in dark mode. However, there seems to be no way how to manually specify…
Tom Kraina
  • 3,569
  • 1
  • 38
  • 58
4
votes
3 answers

WKWebView Dark and Light Mode with dynamic URL in Swift 5

I created WKWebView that doesn't have one url. User use this WKWebView as Safari means user can search anything on WKWebView. I am facing one issue when I change dark and light mode my web view will show me only white(Light) mode. My app is working…
Yogesh Patel
  • 1,893
  • 1
  • 20
  • 55
4
votes
2 answers

Xcode: Dark mode doesn't work if the color is in the framework

On xcode I work within a workspace where there is a basic project and a framework. All colors are defined within the framework. When I configure a label with the color assets of the framework from the basic project on storyboard, the color is taken…
momomorez
  • 515
  • 5
  • 5
4
votes
2 answers

UIUserInterfaceStyle key is not available in Info.plist in Xcode 12, how to disable Dark Mode in Xcode 12 from Info.plist?

I am trying to disable Dark Mode support by setting UIUserInterfaceStyle key to Light in Info.plist file but now it's not available in Info.plist in Xcode 12. Is it still possible to disable Dark Mode support from Info.plist file for iOS Apps in…
Pramod
  • 787
  • 1
  • 7
  • 16
4
votes
1 answer

How to get explicitly light or dark color from ColorSet?

Using UIColor.init(named: "customColorSet") it is no problem to get color from ColorSet which matches the current userInterfaceStyle. However, how can I get a specific color from the color set, e.g. the light or dark color? I tried using…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225