1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Platform: Remove compatibility checks for iOS 12

This commit is contained in:
reuk 2024-07-02 18:10:30 +01:00
parent 5391032238
commit a59d010f99
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
2 changed files with 5 additions and 11 deletions

View file

@ -1079,14 +1079,11 @@ static bool doKeysUp (UIViewComponentPeer* owner, NSSet<UIPress*>* 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

View file

@ -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")