Refresh MKAnnotationView on a MKMapView

前端 未结 7 465
天涯浪人
天涯浪人 2021-01-31 09:27

I\'d like to a-synchronically load images for my custom MKAnnotationView; I\'m already using the EGOImageView-framework (it goes very well with UITableViews), but I fail to make

7条回答
  •  礼貌的吻别
    2021-01-31 09:48

    This is the only way I've found to force redraw of MKAnnotationViews:

    // force update of map view (otherwise annotation views won't redraw)

    CLLocationCoordinate2D center = mapView.centerCoordinate;

    mapView.centerCoordinate = center;

    Seems useless, but it works.

提交回复
热议问题