2012-02-20 107 views
1

我在想,如果有改变注释的气泡颜色在地图中的简单方法。UIMapKit改变泡沫颜色

我知道你也可以继承MKAnnotationView,但似乎很多工作,只是为了改变颜色。有另一种方法吗?

这就是我想要做的事。这种设计缺少引脚,但它必须像这样,但带有一个引脚,就像使用MKPinAnnotationView时一样。 enter image description here

回答

0

你可以尝试通过其子视图循环和改变右子视图背景色。

//change accordingly... 
for(UIView *subview in [MKAnnotationView subviews]) { 
    //get the right subview and change its background color 

} 
+0

MKPinAnnotationView,这是我想要的子类,不返回任何子视图。 – Odrakir 2012-02-21 09:02:58