2012-02-20 112 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