本文介绍了无法实例化名为MKMapView的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能在这里做了一些非常愚蠢的事情,因为我之前已经完成了它现在有效...

I may be doing something really stupid here as I've done it before and it worked and now...

创建一个新的iPad项目,详情我添加了一个MKMapView,将MapKit.framework添加到项目中,将属性/等添加到标题中。去运行项目并获得SIGABRT

Created a new iPad project, in the details view I added a MKMapView, added the MapKit.framework to the project, added the property / etc. to the header. Go to run the project and get a SIGABRT with

我发现但是,就像我说的,我已经添加了框架。我错过了什么?

I found http://mithin.in/2009/06/22/using-iphone-sdk-mapkit-framework-a-tutorial/ but, like I said, I've already added framework. What am I missing?

推荐答案

我也碰到了这个,但是我按照步骤的说明我能够通过它链接中的2(顺便说一句,谢谢):

I ran into this too, but I was able to get past it by following the instructions of step 2 in your link (thanks, by the way):


  1. 添加MapKit框架到项目。 (控制+单击框架
    文件夹 - >添加 - >现有框架)


I刚搜索了MapKit.framework,将其添加到项目中,错误就消失了。

I just searched for MapKit.framework, added it to the project, and the error went away.

我还没有添加任何地图代码(虽然我有一个MapViewDelegate在IB)连接,但它到目前为止工作正常!

I haven't added any map code yet (although I do have a MapViewDelegate connected in IB), but it's working fine so far!

这篇关于无法实例化名为MKMapView的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 01:27