0

在真实设备(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];

有什么想法吗?我不知道该看什么:/

4

1 回答 1

0

点击时,您可以尝试将(注释)视图放在前面。

因此,当有人点击注释时,您应该调用[[self superview] bringSubviewToFront:self];

最好的,克里斯蒂安

于 2011-04-24T19:20:46.940 回答