Koordinate未申报的错误
问题描述:
在我的代码,我想从阵列创建坐标值:Koordinate未申报的错误
for(int i=1; i<[appDelegate.latitudeArray count]; i++) {
Koordinate *coord = [[Koordinate alloc] init];
coord.latitude = [[appDelegate.latitudeArray objectAtIndex:i] floatValue];
coord.longtitude = [[appDelegate.longitudeArray objectAtIndex:i] floatValue];
}
但我正在逐渐误差Koordinate未申报。我还添加了CoreLocation框架。
答
首先没有类命名Koordinate
,只有CLLocationCoordinate2D
,其是一个结构
CLLocationCoordinate2D coordiante;
coordiante.latitude =[[appDelegate.latitudeArray objectAtIndex:i] floatValue];
coord.longtitude = [[appDelegate.longitudeArray objectAtIndex:i] floatValue];
+0
谢谢。我知道了。 – anjum 2012-02-29 12:54:09
相依但为什么在循环从1开始(数组索引0处开始)? – Anna 2012-02-29 13:16:56