Hello everyone,
I'm an aspiring iOS developer and I've just started following official SwiftUI tutorial which I've found very nice.
However, on the second chapter I've encountered this error "Cannot find type 'xxxx' in scope" and I couldn't resolve it no matter what I tried.
Would you please help? Thank you very much!
Here xcode says it cannot find "Image" (line 12) and "CLLocationCoordinate2D" (on line 17) in scope.
import Foundation
struct Landmark: Hashable, Codable {
var id: Int
var name: String
var park: String
var state: String
var description: String
private var imageName: String
var image: Image {
Image(imageName)
}
private var coordinates: Coordinates
var locationCoordinate: CLLocationCoordinate2D {
CLLocationCoordinate2D(
latitude: coordinates.latitude,
longitude: coordinates.longitude)
}
struct Coordinates: Hashable, Codable {
var latitude: Double
var longitude: Double
}
}