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

UIBarButton icon does not change when theme changes in iOS 13

I am facing an issue on iOS 13 where the UIBarButton icon does not change when I switch the iOS theme. I have created two sets of images for dark and light themes and added them to xcassets as shown in the image below. When I change the theme, the…
ashishn
  • 410
  • 5
  • 18
1
vote
1 answer

Only light appearance color returned from [UIColor colorNamed:] even though traitCollection.userInterfaceStyle = Dark

I am working on adding iOS 13 Dark Mode support to my iOS 11+ app. The works great using named / dynamic colors all over the app. However, when using [UIColor colorNamed:] in a custom class always the light color version (#ffffff / white) is…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
1
vote
1 answer

How do I detect dark/light mode changes in my AppDelegate in order to reset global tintColor?

In my AppDelegate, I set the global tint color. How can I be notified when the user enables/disables dark mode in order to reset global tint? In my AppDelegate, I have: @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { …
1
vote
1 answer

Understanding SystemColors for dark mode in older iOS

Edit: Based on conversations below my confusion was the fact that not all of the system color are compatible with older operating systems, in my case the label and the systemBackground colors are iOS13 only which requires the fallback. It makes…
fs_tigre
  • 10,650
  • 13
  • 73
  • 146
1
vote
1 answer

Dark Mode AppStore policy

Hello I would like to know if forcing my app to light mode by setting User Interface Style to Light in plist can result to the rejection of my app ??
Hach3m
  • 71
  • 6
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
1
vote
2 answers

iOS 13 UIBarButtonItem color in dark mode

My UIBarButtonItem image doesn't change its color when switching between dark and light mode. I set the color programmatically and expected it to change between black and white when switching the mode. At least it works with the tintColor of my…
Tiu
  • 23
  • 4
1
vote
0 answers

Splash screen default bar style for iOS 13 and light content for pre 13

I want to achieve the following: Light content status bar on splash screen when iOS version is < 13 Default status bar on splash screen when iOS version is 13 (light content when dark mode and dark content when light mode) These are the options I…
1
vote
1 answer

UINavigationBar appearance + iOS 13 Dark Mode - How to set app wide color?

In iOS 12 and before I used [[UINavigationBar appearance] setBackgroundColor...] to set a app wide background color for all NavBars. In iOS 13 I would like to do the same while supporting Dark Mode. In the apps Asset Catalog I defined a named Color…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
1
vote
1 answer

iOS 13 dark mode: UIColor.link too dark when used for NSAttributedString

with iOS 13 dark mode, I use UIColor.link for two cases: foregroundColor color for NSAttributedString tint color for icons problem: though I use UIColor.link in both cases, they render as different colors. The color rendered for…
Gerd Castan
  • 6,275
  • 3
  • 44
  • 89
1
vote
3 answers

Picker Text color in DarkMode

How do set the text in a Picker control to a light color for iOS13 darkmode To support DARKMODE on IOS13 you need to set the text color to a colour that the system can change. But on the inspector, there is no ability to set the Picker text to any…
ManorBoy
  • 89
  • 3
1
vote
0 answers

UINavigationBar shadowImage doesn't work with a dynamic image (dark mode)

I'm trying to configure a dynamic image for shadowImage using an image from Assets catalog: let navigationBar = UINavigationBar.appearance() navigationBar.shadowImage = UIImage(named: "test") // image is configured for dark/light appearance but it…
Nikita Ermolenko
  • 2,139
  • 2
  • 19
  • 41
1
vote
1 answer

How do i resolve default iOS elements to a particular trait?

How do i resolve a default iOS system element, like say UISegmentedControl, to a particular interface style? I know colors can be resolved like this. color.resolvedColor(with: UITraitCollection(userInterfaceStyle: .dark)) How do i do the same for…
Rakesha Shastri
  • 11,053
  • 3
  • 37
  • 50
1
vote
0 answers

When I update Xcode 11 beta3 version I can't find dark mode switch on Simulator

anybody know where the switch that can open dark mode is ? Xcode beta2 ,simulator, in setting->developer->dark mode switch but Xcode beta3, I can't find that switch
0
votes
0 answers

What's the best way to change font color to white for dark mode in iOS and Android devices for gmail and outlook?

I need to display blue color text #243De9 in normal mode and white color in dark mode devices for gmail and outlook in iphone and android, but it's not working, after giving the specific CSS. please confirm how to proceed. Normal mode is working…