xcode:打印MKMapView区域,span,latitudeDelta,longitudeDelta

时间:2011-07-04 05:34:18

标签: iphone objective-c xcode ipad mkmapview

我正在尝试NSLogM区域,span,latitudeDelta,MKMapView的longitudeDelta。但是它发送了像

这样的消息
Program received signal:  “EXC_BAD_ACCESS”.

我的代码是这样的:

@interface TaetPaViewController : UIViewController <MKMapViewDelegate, CLLocationManagerDelegate, NSXMLParserDelegate> {
    IBOutlet MKMapView *regionsMapView;
}

@property (nonatomic, retain) IBOutlet MKMapView *regionsMapView;

@synthesize regionsMapView;

- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated{
    NSLog(@"regionsMapView.region.span.latitudeDelta: %@", regionsMapView.region.span.latitudeDelta);

}

- (void)dealloc {
    [super dealloc];
    [regionsMapView release];
}

1 个答案:

答案 0 :(得分:3)

你重新打印双(latitudeDelta)作为指针。使用%f代替或类似的