设置Assetslibrary.framework时出错

时间:2012-09-03 16:44:25

标签: iphone xcode map assets

这是我的大问题。当我添加“Assetlibrary.Framwork”时,我的mapView运行时出错。如果我删除库,我的mapView就可以了。为什么?这是我的mapview代码:( p.s我正在使用故事板)

.h
@property (strong, nonatomic) IBOutlet MKMapView *MapView;

.m
viewdidload:
MapView.delegate = self;
[self setLocationManager:[[CLLocationManager alloc] init]];
[locationManager setDelegate:self];
[locationManager setDistanceFilter:kCLDistanceFilterNone];
[locationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters];
[locationManager startUpdatingLocation];

- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
if ((oldLocation.coordinate.longitude != newLocation.coordinate.longitude)
    || (oldLocation.coordinate.latitude != newLocation.coordinate.latitude)) {

    coord.latitude = newLocation.coordinate.latitude;
    coord.longitude = newLocation.coordinate.longitude;


    region.center = coord;

    span.latitudeDelta = 0.05;
    span.longitudeDelta = 0.05;
    region.span = span;
}

这是我的错误:

  

'NSUnknownKeyException',原因:'[setValue:forUndefinedKey:]:此类不是键值MapView的键值编码兼容。'

我是否设置了两次mapview?或者我做错了什么?

0 个答案:

没有答案