Refresh MKAnnotationView on a MKMapView

前端 未结 7 628
天涯浪人
天涯浪人 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:44

    (I don't see how to indicate that this post pertains to zerodiv's answer.) I was able to get zerodiv's method to work by adding a kickstart of sorts, forcing a meaningless but different coordinate, then restoring the prior, correct one. The screen doesn't flash at all because of the first location.

    CLLocationCoordinate2D center = mapView.centerCoordinate; 
    CLLocationCoordinate2D forceChg;
    forceChg.latitude = 0;
    forceChg.longitude = curLongNum;
    
    mapView.centerCoordinate = forceChg;
    mapView.centerCoordinate = center;
    

提交回复
热议问题