Could not instantiate class named MKMapView

后端 未结 9 1357
天涯浪人
天涯浪人 2020-12-23 20:14

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

Created a new iPad project, in the details view I added a MKMapView, add

相关标签:
9条回答
  • 2020-12-23 20:44

    For Xcode 6.1:

    • Select your project
    • In general tab, look for Linked Frameworks and Libraries (last one)
    • Press + button
    • Search MapKit.framework
    • Finally add
    0 讨论(0)
  • 2020-12-23 20:51

    For xCode 4.2:

    Click on your project name ->targets ->building Phase ->link binary with library 
      -> click on + sign ->select mapKit.framework ->click add
    
    0 讨论(0)
  • 2020-12-23 20:52

    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. Add the MapKit framework to the project. (Control + Click Frameworks folder -> Add -> Existing Frameworks)

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

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

    0 讨论(0)
提交回复
热议问题