Swift How to save data? Userdefaults
How to save data in ios? You can use UserDefaults to store any basic data type such as Bool, Float, Double, Int, String, or URL, but you can also write more complex types such as arrays, dictionaries and Date – and even Data values. Note that data you saved in user defaults is gone when user delete app. When you write data to UserDefaults, it automatically gets loaded when your app runs. Let’s g..