alexaubry / alexaubry/BulletinBoard

Dark mode support cannot be overridden at runtime

Open
#174 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
5.3k
Forks
301
PR merge metrics
No merged PRs in 30d

Description

**Problem Description:**
#170 added Dark Mode support in a simplistic manner: If running on iOS 13, use whatever color is provided by the operating system for the Dynamic Color `systemBackground`

If an App opts out of Dark Mode support by setting User Interface Style to .light in Info.plist, the dynamic colors match the old behavior. But it is also valid to honor Dark Mode and [opt out for individual view controllers and their children](https://developer.apple.com/documentation/xcode/supporting_dark_mode_in_your_interface/choosing_a_specific_interface_style_for_your_ios_app).

Unfortunately, setting `overrideUserInterfaceStyle = .light` or passing a new UITraitCollection to new Window or ViewController does not change the definition of Dynamic Colors, when Dark Mode is enabled `systemBackground` is always black.

Suggestion:
1. easy - update BltnItemManager to take a (default nil) UITraitCollection
2. better - add `backgroundColor` and `defaultActivityIndicatorColor` to BLTNItemAppearance, update BltnItemManager to take an optional BltnInterfaceManager, and use the interfaceManager for both setting up the main card view, as well as passing it through to makeArrangedSubviews()

Thoughts?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.