小编ADK*_*ADK的帖子

收到错误“无法将模块'MapKit'加载为'MapKit'”

这是我的第一个程序。而且,我正在实现MapKit。以下是代码:

import UIKit
import MapKit
class ViewController: UIViewController {

@IBOutlet weak var mapView: MKMapView!
    override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}}
Run Code Online (Sandbox Code Playgroud)

如果我不导入MapKit,则会收到错误消息,因为“弱可能仅适用于类和类绑定的协议类型”。如果这样做,我会得到标题中提到的错误。

我不明白我要去哪里错了。

iphone objective-c mapkit ios swift

1
推荐指数
1
解决办法
1146
查看次数

标签 统计

ios ×1

iphone ×1

mapkit ×1

objective-c ×1

swift ×1