diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 59bef035b..24e7bf62a 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -72,6 +72,9 @@ import UIKit var scrollBarStyle: UIScrollView.IndicatorStyle { get } var keyboardAppearance: UIKeyboardAppearance { get } + + @available(iOS 12.0, *) + var userInterfaceStyle: UIUserInterfaceStyle { get } // MARK: - Colors not defined in the design palette diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index be331bed1..146185f54 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -71,6 +71,11 @@ class DarkTheme: NSObject, Theme { var statusBarStyle: UIStatusBarStyle = .lightContent var scrollBarStyle: UIScrollView.IndicatorStyle = .white var keyboardAppearance: UIKeyboardAppearance = .dark + + @available(iOS 12.0, *) + var userInterfaceStyle: UIUserInterfaceStyle { + return .dark + } var placeholderTextColor: UIColor = UIColor(rgb: 0xA1B2D1) // Use secondary text color var selectedBackgroundColor: UIColor = UIColor(rgb: 0x040506) diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index 357870f8f..cc3225bf0 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -77,6 +77,11 @@ class DefaultTheme: NSObject, Theme { } var scrollBarStyle: UIScrollView.IndicatorStyle = .default var keyboardAppearance: UIKeyboardAppearance = .light + + @available(iOS 12.0, *) + var userInterfaceStyle: UIUserInterfaceStyle { + return .light + } var placeholderTextColor: UIColor = UIColor(rgb: 0x8F97A3) // Use secondary text color