尝试构建我的数据时,我不断收到 Use of unresolved identifier 'CLLocationCoordinate2D' 。这是一个保存数据的类,它附加了一个我稍后将在 Map 和 TableViewController 中使用的数组。关于为什么我收到此错误的任何想法?
导入基础导入 UIKit 导入 CoreData
class StationsData: NSObject {
//define the varibles
init () {
}
var stations: [StationItem]
//initiate the array and assig the values to the array
required init(coder aDecoder: NSCoder) {
stations = [StationItem]()
let row0 = StationItem(title: "Station1", address: "25 Israel Eldad St, Jerusalem", coordinate: CLLocationCoordinate2D(latitude: 31.7513239, longitude: 35.224822899999936))
stations.append(row0)
let row1 = StationItem(title: "Station2", address: "25 Israel Eldad St, Jerusalem", coordinate: CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0)) …Run Code Online (Sandbox Code Playgroud)