I know this is a frequently asked question and probably the most debated one on Stackoverflow overall. However I have now been searching for the answer for about one week without any luck.
Here is what I want to do..
I have two ViewControllers lets call them mainVC and settingsVC.
In my settingsVC I have a function where the user can put their hourly salary in a textfield that then saves using UserDefaults. This is the data I want to access in the mainVC.
However they don't have any connection to each other (their not bind by any segue and I don't want them to be) and I don't want the mainVC to be instantiated when I save my data.
Furthermore I do not want to use global variables. So what is the best way to do this?
To conclude I simply want to retrieve the data from my settingsVC in my mainVC without using global variables and segues.