Starting from iOS/iPadOS 13, a dark user interface style is available, similar to the dark mode introduced in macOS Mojave. How can I check whether the user has enabled the
For iOS 13, you can use this property to check if current style is dark mode or not:
if #available(iOS 13.0, *) { if UITraitCollection.current.userInterfaceStyle == .dark { print("Dark mode") } else { print("Light mode") } }