Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do reset a key? #237

Closed
ConfusedVorlon opened this issue Mar 16, 2020 · 2 comments
Closed

How do reset a key? #237

ConfusedVorlon opened this issue Mar 16, 2020 · 2 comments

Comments

@ConfusedVorlon
Copy link

It looks like there is functionality around resetting keys, but I can't figure out how to access it.

Any help appreciated.

given

extension DefaultsKeys {
    var messageTitle: DefaultsKey<String> { return .init("HSMessageTitle",defaultValue: "SomeString") }
}

how can I reset messageTitle ?

thanks.

@RomanPodymov
Copy link

Hello @ConfusedVorlon
Try Defaults.remove(\.messageTitle).

@ConfusedVorlon
Copy link
Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants