本文介绍了自定义注释视图在iOS6上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用J4n0标注代码()在MapKit中实现自定义注释。
I'm using the J4n0 Callout code (github) to implement a custom annotation in MapKit.
它在iOS5上运行得很好。但是在iOS6上我有两个问题:
It was working just fine on iOS5. But on iOS6 I have 2 problems:
- 注释显示在AnnotationView上(见图1)。
- 第一次单击注释会打开AnnotationView,但第二次单击会打开一个尺寸不佳的注释(参见图2)。
使用此库的人是否有类似的问题/解决方案?
Does anyone using this library have some similar problem/solution?
如果需要,我可以提供一些代码!
I can give some code if needed!
推荐答案
如果注释显示在AnnotationView上试试代码:
If annotations are displayed over the AnnotationView try to code:
- (void)didMoveToSuperview {
[super didMoveToSuperview];
[self.superview bringSubviewToFront:self];
}
以防上述解决方案不起作用试试
Just in case above solution doesn't work try
view.layer.zposition = 1
这篇关于自定义注释视图在iOS6上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!