简体   繁体   中英

App display error in iOS7 Xcode5 in MKPolyline

I am updating my old app to iOS7 . In that app i am displaying line over map using MKPolyline . its working fine in iOS6 and Xcode 4.6 but doesnt work in my new xcode and displayed error on the codes of MKPolyline .

Is apple has change MapKit Framework . what should i have to update?

On the MKPolyline codes display this error

Unknown type name 'MKPolyline'

But if i Control-Click the MKPolyline than it will take me to the MapKit class.

First of all i think this is the problem with the #import code. You said that this is an old app. please show us the #import code for mapkit framework.

If it like this:

#import "MapKit/MKMapView.h"

than change it to this:

#import <MapKit/MapKit.h>

I think this will solve the unknown class error. if still its display error than use MKGeodesicPolyline instead of MKPolyline . You can find nice explanation here .

Hope it help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM