Was wondering how to use NSUserDefaults
if this would be the correct solution to save data that I have in an application. The data is not very much so I though this could be a good solution. Currently stores data into objects in the app, then the objects are loaded into the array once the user sets them.
var placesChosen: [Place] = []
var myplaces: Place = Place()
class Place {
var name: String?
var locationAddress: String?
var locationPhoneNumber: String?
}
function createPlace(){
// code to add place
placeChosen.append("some data to add")
}
I later would like to pull from the data that is stored by NSUserDefaults
and show the data back to the user. Additionally I though I should mention that the user would only be able to set for objects into the array.