From 33f21390bc7561df72ae15dc33cd2b7fc0b6ba59 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 9 May 2019 18:08:18 +0700 Subject: [PATCH] Mention strongly-typed change object for observation --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index fee007d..006c7b6 100644 --- a/readme.md +++ b/readme.md @@ -173,6 +173,8 @@ let observer = defaults.observe(.isUnicornMode) { change in defaults[.isUnicornMode] = true ``` +In contrast to the native `UserDefaults` key observation, here you receive a strongly-typed change object. + ### Default values are registered with UserDefaults When you create a `Defaults.Key`, it automatically registers the `default` value with normal UserDefaults. This means you can make use of the default value in, for example, bindings in Interface Builder.