昨天遇到个奇怪的问题,用户的位置在地图中死活不显示,showUserLocation也设置了,最后发现是因为实现了 mapView protocol中的一个方法:

-(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id <MKAnnotation>)annotation;

显示用户位置时会有这个回调,因为自己在里面返回了一个未初始化好的View,导致系统的默认Pin没有显示出来。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2021-10-10
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-26
  • 2021-09-21
  • 2021-10-06
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案