我试图将标记或图钉图像更改为我使用 alamofireimage 从 firebase 下载的图像。请我需要帮助
这是我的代码:
let coordinates = CLLocationCoordinate2D(latitude: milatitud!, longitude: milongitud!)
let annotation = MKPointAnnotation()
annotation.coordinate = coordinates
annotation.title = "JuanJo"
self.map.addAnnotation(annotation)
//print ("4444444444")
for annotation: MKAnnotation in self.map.annotations {
let anView = self.map.view(for: annotation)
if (anView != nil)
{
let url = URL(string: link!)
self.imagen.af_setImage(withURL: url!, placeholderImage: UIImage(named: "usuarioprevia.jpeg"), filter: CircleFilter(), imageTransition: .crossDissolve(0.5), runImageTransitionIfCached: true, completion: nil)
anView?.image = "image downloaded from firebase with alamofireimage"
}
我不知道最后一部分如何设置它=用于显示图像,我还需要调整它的大小。请帮忙