uchicago-mobi / MPCS51030-2017-Winter-Forum

7 stars 0 forks source link

Saving custom structs/classes in UserDefaults #178

Open aaggarw99 opened 7 years ago

aaggarw99 commented 7 years ago

Hello,

To my understanding, saving arrays of custom structs and classes into UserDefaults is not allowed. What's the best alternative to saving an array of structs so that it is remembered every time the app is reopened?

Thanks

tabinks commented 7 years ago

Two possible solutions: