Basic data. How do I store a custom object as a convertible attribute?
I currently have a class called Place, defined like this:
class Place {
let name: String
let address: String
let coordinate: CLLocationCoordinate2D
let type: String
var photoReference: String?
var photo: UIImage?
/* functions etc */
}
In my data model, I have an object called FoundPlaces. It has one attribute of place
type "transformable".
I am going crazy trying to find a Swift solution to store this object. Is the data model in error?
Any guidance is appreciated. Thank!
+3
source to share