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

Default value cannot be updated when the app switches the users' accounts #27

Open
wangqinggong opened this issue Sep 14, 2016 · 0 comments

Comments

@wangqinggong
Copy link

Let me describe my question explicitly. For example, I define a key named 'autoSpeak ' in the GVUserDefault's category,and I set its default value is YES in the selector 'setupDefaults'. Then I run my app for the very first time, and log in. The UISwitch controlled by autoSpeak is close. Then I killed my app ,and then run it again,the UISwitch is open now. The same question happened when I switch to another user account.
I looked through the source code. I found setupDefaults is called in the selector init, but the object of GVUserDefault is singleton, so that is the reason, I thought.
Now I solve this problem by called setupDefaults again. But I do not think this is the perfect plan. I wish you, the author, can fix this issue in the source code .

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

1 participant