I have a Photo class
class Photo: NSManagedObject {
}
I want to extend it to provide MKAnnotation
I tried doing it so by
extension Photo: MKAnnotation {
var coordinate: CLLocationCoordinate2D
However the compiler complains that extensions cannot have stored properties.
Is there a better way of accomplishing this?
Thanks.
You cannot have stored properties, but you can have calculated properties!
I.e: