如何在Map Annotation前面添加图像弹出窗口。
这是一个image that will show you what exactly i want to do。我需要在引脚点上添加一个图像,如图所示。
AddMap *st = [[AddMap alloc] init];
st.title = @"title";
st.coordinate = region.center;
[self.mapView addAnnotation:st];
如何添加图片?
注意:AddMap是我写的一个初始化title
变量
答案 0 :(得分:2)
您必须将图像设置为属性leftCalloutAccessoryView。
尝试:
UIImageView *profileIconView = [[UIImageView alloc] initWithImage: ..........
annotationView.leftCalloutAccessoryView = profileIconView;
希望这有帮助。