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

Evaluating UITraitCollection's hasDifferentColorAppearance(comparedTo:) result

In my app I need to make some custom UI changes when iOS system dark mode settings change. According to https://developer.apple.com/videos/play/wwdc2019/214/ it's explicitly mentioned to implement traitCollectionDidChange and compare the previous…
RTasche
  • 2,614
  • 1
  • 15
  • 19
3
votes
2 answers

How to support dark mode in splash screens?

I am trying to support dark mode in a splash screen, which means that I am using a named color inside the LaunschScreen.storyboard file, but I have this error: Named colors do not work prior to iOS 11.0. Clearly the problem is that named colors…
Ramy Al Zuhouri
  • 21,580
  • 26
  • 105
  • 187
3
votes
0 answers

How to know centrally when the UI style (dark/light) changes in iOS?

I have an iOS app that had its own theming system (dark/light UI styling) before iOS 13 introduced it natively. This is partly achieved via the UIAppearance methods on various UI elements, like bar button items, segmented controls, and such. To…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
2
votes
0 answers

Ionic angular app - dark mode toggle not affects part of components in iOS

I'm writing Ionic app and I have some strange problem with manual selecting dark/auto/light mode but only on iOS. So, I have page called "Settings" in my app where user can find 3 buttons for selecting color mode: Dark, Auto, Light. Clicking on any…
hvma411
  • 349
  • 2
  • 17
2
votes
0 answers

PDFKit dark mode interface style for pdf document

Is there a way to adapt to pdf document with the dark mode of containing view? Below doesn't change any aspect of PDF document. let pdfView = PDFView() pdfView.overrideUserInterfaceStyle = .dark guard let documentUrl =…
nvn
  • 21
  • 2
2
votes
2 answers

Change background colour for html emails in dark mode on mobile phoner

I am trying to get the HTML email to have normal white background even when a mobile dark mode is turned on, I have added the below meta and media queries meta name="color-scheme" content="light dark" meta name="supported-color-schemes"…
Anitha
  • 21
  • 1
  • 2
2
votes
2 answers

SwiftUI Dark Mode not applying to sheets

I'm using a toggle and @AppStorage to change the preferredColorScheme in my app. Dark mode and light mode works fine on Views other than sheets and full screen modals. struct MyApp: App { @AppStorage("darkMode") var darkMode = false init()…
mucahid-erdogan
  • 276
  • 2
  • 10
2
votes
1 answer

Testing Dark Mode using snapshot testing

Any leads how can we use Snapshot testing to test darkmode implementation? Or any other testing strategy for dark mode on iOS. When XCUITest is one of the options along with XCTest (unit-test). The problem with UITest in dark mode means for every…
2
votes
4 answers

SwiftUI: How to let the user set the app appearance in real-time w/ options "light", "dark", and "system"?

I am currently trying to implement a solution in an app where the user is supposed to be able to switch the app's appearance in real-time with the following options: System (applying whatever appearance is set in the iOS settings for the…
Malburrito
  • 860
  • 7
  • 23
2
votes
1 answer

Detect dark mode in XCUI test on real devices

I'm trying to find a way to detect whether a phone is in dark mode or not in an XCUI test. So far I've got this: private func darkMode() -> Bool { if #available(iOS 13, *) { return UIView().traitCollection.userInterfaceStyle…
Ishmael7
  • 172
  • 1
  • 10
2
votes
1 answer

Tab Bar Controller: Icon and Colors when switching to dark mode

When I switch my app to dark mode this is what happens to the tab bar. How can i make the tapped icon fully visible in the dark mode environment? im using the runtime property tintColor to automatically change the color and it's set in this…
karalis1
  • 205
  • 1
  • 12
2
votes
2 answers

React native colorScheme

I need to know the colorScheme of the device. I've found two ways to know, but I don't understand what the difference is between the two. Which one do you recommend to use and why? useColorScheme import { Text, useColorScheme } from…
Paul
  • 3,644
  • 9
  • 47
  • 113
2
votes
0 answers

CupertinoDynamicColor not working for text style within a theme in Flutter

Currently I've got a problem with the dark mode for iOS in Flutter. I'm using a CupertinoApp with a CupertinoTheme. With CupertinoDynamicColor.withBrightness() it's possible to define colors for dark and light theme. This is working for example for…
Daniel
  • 1,999
  • 4
  • 15
  • 27
2
votes
1 answer

navigation bar style change while iphone theme is in dark mode

Hello I am creating app with Swift i have just started creating app and take one View Controller and embed in navigation controller and for remove navigation bar border i used below code…
2
votes
1 answer

React native Navigation | How to set Up Dark theme

I am practicing and new in React native and I really like React navigation. I have been playing around react navigation and made custom settings like ErrorBoundary which it works fine. I created one component and named it settings, from that…