diff --git a/site/posts/2023-03-20-theming-ios-apps.md b/site/posts/2023-03-20-theming-ios-apps.md index 3a08b42..d753d2c 100644 --- a/site/posts/2023-03-20-theming-ios-apps.md +++ b/site/posts/2023-03-20-theming-ios-apps.md @@ -30,11 +30,11 @@ With a simple extension on `UITraitCollection`, you can make it look like any ot extension UITraitCollection { var pureBlackDarkMode: Bool { get { - (value(forKey: "_clientDefinedTraits") as? [String: Any])?[key] as? Bool ?? true + (value(forKey: "_clientDefinedTraits") as? [String: Any])?["tusker_usePureBlackDarkMode"] as? Bool ?? true } set { var dict = value(forKey: "_clientDefinedTraits") as? [String: Any] ?? [:] - dict[key] = newValue + dict["tusker_usePureBlackDarkMode"] = newValue setValue(dict, forKey: "_clientDefinedTraits") } }