这个类不是关键码值的关键值,

我在iOS应用程序中创build了MKMapView的应用程序,以在我的iPhone中显示地图。 跑步时我得到了这个

错误:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x9847150> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mapview.' *** 

谁能帮我解决这个问题? 提前致谢。

很可能你可能已经创build了一个名为mapview的sockets,并在稍后删除它。 检查MapView的出口在Xib / Storyboard中是否损坏。