Beam consists of a dark mode before Apple introduced it into the system. This PR changes our existing styling mechanism with Apple's implementation.
Changes
Changed the app's display options to either respect system appearance, or manually toggle between light/dark mode
DisplayModeController has been renamed to ApperanceController. Its purpose is to observe user setting changes, and override the app's user interface style accordingly.
Protocol DynamicDisplayModeView has been renamed to BeamAppearance and simplified. Its purpose is to have a legacy way of styling UI items, without having to change all UI related code in the app. displayModeDidChange is renamed to appearanceDidChange, and should be called by either traitCollectionDidChange, or viewDidLoad by the highest implementing class in its ancestry.
All base view controllers in Beam implement BeamAppearance, so most view controllers should automatically implement dark mode changes.
All template colors from UIColor+Beam have moved to the asset catalog. This way, we can also use them in storyboards.
To be changed
BeamAppearance is a temporary protocol so we don't need to overhaul our complete app UI at the moment. The intention is to implement asset catalog based colors for all UI elements at some point, so we don't need BeamAppearance anymore.
At the moment, many UI elements define custom colors in their appearanceDidChange method. This is not preferred, and we need to move them to the asset catalog at some point.
Beam consists of a dark mode before Apple introduced it into the system. This PR changes our existing styling mechanism with Apple's implementation.
Changes
DisplayModeController
has been renamed toApperanceController
. Its purpose is to observe user setting changes, and override the app's user interface style accordingly.DynamicDisplayModeView
has been renamed toBeamAppearance
and simplified. Its purpose is to have a legacy way of styling UI items, without having to change all UI related code in the app.displayModeDidChange
is renamed toappearanceDidChange
, and should be called by eithertraitCollectionDidChange
, orviewDidLoad
by the highest implementing class in its ancestry.BeamAppearance
, so most view controllers should automatically implement dark mode changes.To be changed
BeamAppearance
is a temporary protocol so we don't need to overhaul our complete app UI at the moment. The intention is to implement asset catalog based colors for all UI elements at some point, so we don't need BeamAppearance anymore.appearanceDidChange
method. This is not preferred, and we need to move them to the asset catalog at some point.