In UserDefault file I have six fields. I want to persist two field always and reset four other field in some scenario. What is best approach to handle this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your want the four field to reset with their default values.
And the default value may be an
empty string,Edited:
For removing field rather than resetting: Use the below