在真实设备(iPhone 3G,3.1.3)上测试我的应用程序时,我遇到了图像中描述的问题。在模拟器中很好(带有 ios 4.1 sdk 的 xcode 3)。抱歉,还不能发布图片,这是我在这里的第一个问题。
http://i.stack.imgur.com/Ct4on.jpg
我在注释的实现中有以下代码:
- (id)initWithLocation:(CLLocationCoordinate2D)coord {
self = [super init];
if (self) {
coordinate = coord;
}
return self;
}
这是头文件的一部分:
@interface MyAnnotation : NSObject <MKAnnotation>
这就是我创建一个新的地方(在循环内):
MyAnnotation *theAnnotation = [[MyAnnotation alloc] initWithLocation:theCoordinate];
theAnnotation.title = [single objectForKey:@"address"];
theAnnotation.objID = [single objectForKey:@"id"];
[self.mapView addAnnotation:theAnnotation];
[theAnnotation release];
有什么想法吗?我不知道该看什么:/