Untitled

 avatar
unknown
plain_text
2 years ago
394 B
18
Indexable
@objc private func changeTheme() {
        if themeSwitcher.isOn {
            UIApplication.shared.windows.first?.overrideUserInterfaceStyle = .dark
            UserDefaults.standard.set("dark", forKey: "theme")
        } else {
            UIApplication.shared.windows.first?.overrideUserInterfaceStyle = .light
            UserDefaults.standard.set("light", forKey: "theme")

        }
    }
Editor is loading...