【发布时间】:2014-10-18 12:38:29
【问题描述】:
总的来说,我对 iOS 的东西还是很陌生,在测试我们的应用程序的 iOS 8 兼容性时发现了一个问题。 在 iOS 7 中一切正常,但在 iOS 8 中,rightCalloutAccessoryView 在某些情况下会错位。
第一张截图:正确对齐
第二张截图:错误对齐
如您所见,当信息窗口的标题很长时,就会出现问题。但在 iOS 7 上情况并非如此,我找不到任何提及这已更改的内容?
我试图了解原因并找到解决此问题的方法,但还没有找到任何东西。 这是否可以由我们自己解决,还是我们必须向 Apple 提出问题?
任何帮助/想法都将受到高度赞赏,因为我对这个问题感到不知所措。
添加 MKAnnotationViews 的代码
- (MKAnnotationView *)viewForStation:(id<MKAnnotation>)annotation {
static NSString *stationIdentifier = @"stao";
MKAnnotationView *annotationView = [self.mapView dequeueReusableAnnotationViewWithIdentifier:stationIdentifier];
if (annotationView == nil) {
annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:stationIdentifier];
annotationView.image = [UIImage bundleImageNamed:PIN_IMAGE];
annotationView.canShowCallout = YES;
annotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
}
return annotationView;
}
您可能感兴趣,我(刚刚)也将此问题添加到 apple.developer.com 上的 iOS 8 Beta 版块:https://devforums.apple.com/thread/242282?tstart=0
如果我在这里或 apple.developer.com 上得到答案,我会反映它,以便我们可以在两个网站上找到它
【问题讨论】:
-
还没有人有想法吗?
-
我也有同样的问题 :(
-
我自己也是,我无法解决这个问题:(
-
同样的问题...
-
他们将我的问题作为副本关闭,没有任何评论,您甚至无法查看待处理的问题。福苹果!
标签: ios mapkit ios8 mkannotationview