Hello,
In my application I am going to create a settings screen that will allow the user to change a couple of aspects in terms of how the core feature of the app works.
I have been wondering what might be the best way to save the user settings. I have considered global variables, binding variables and user defaults.
When it comes to global variables I don't think I have ever used them, with the exception of debugging. I kinda consider it a bad practice and I don't think all the screens of my app should have the ability to see and change this values.
Then, there is the possibility of using binding variables. I think this may be like trying to kill a fly with a war tank. I think it is too much and adds a lot of complexity to something that should be pretty straight-forward.
Finally, user defaults, to me, seems the best way to go. I can change it and keep persistency and it can be accessed easily.
What do you think is the best way to go?
Thank you for your help.
In my application I am going to create a settings screen that will allow the user to change a couple of aspects in terms of how the core feature of the app works.
I have been wondering what might be the best way to save the user settings. I have considered global variables, binding variables and user defaults.
When it comes to global variables I don't think I have ever used them, with the exception of debugging. I kinda consider it a bad practice and I don't think all the screens of my app should have the ability to see and change this values.
Then, there is the possibility of using binding variables. I think this may be like trying to kill a fly with a war tank. I think it is too much and adds a lot of complexity to something that should be pretty straight-forward.
Finally, user defaults, to me, seems the best way to go. I can change it and keep persistency and it can be accessed easily.
What do you think is the best way to go?
Thank you for your help.