diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index f30b6ff3d3..7b708a2785 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -1079,14 +1079,11 @@ static bool doKeysUp (UIViewComponentPeer* owner, NSSet* presses, UIPr { [super traitCollectionDidChange: previousTraitCollection]; - if (@available (iOS 12.0, *)) - { - const auto wasDarkModeActive = ([previousTraitCollection userInterfaceStyle] == UIUserInterfaceStyleDark); + const auto wasDarkModeActive = ([previousTraitCollection userInterfaceStyle] == UIUserInterfaceStyleDark); - if (wasDarkModeActive != Desktop::getInstance().isDarkModeActive()) - [[NSNotificationCenter defaultCenter] postNotificationName: UIViewComponentPeer::getDarkModeNotificationName() - object: nil]; - } + if (wasDarkModeActive != Desktop::getInstance().isDarkModeActive()) + [[NSNotificationCenter defaultCenter] postNotificationName: UIViewComponentPeer::getDarkModeNotificationName() + object: nil]; } - (BOOL) isAccessibilityElement diff --git a/modules/juce_gui_basics/native/juce_Windowing_ios.mm b/modules/juce_gui_basics/native/juce_Windowing_ios.mm index ceae2d463d..34fac5502c 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_ios.mm +++ b/modules/juce_gui_basics/native/juce_Windowing_ios.mm @@ -545,10 +545,7 @@ bool Desktop::canUseSemiTransparentWindows() noexcept bool Desktop::isDarkModeActive() const { - if (@available (iOS 12.0, *)) - return [[[UIScreen mainScreen] traitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark; - - return false; + return [[[UIScreen mainScreen] traitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark; } JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector")