ViewForAnnotation is not being called

后端 未结 9 2006
悲哀的现实
悲哀的现实 2020-12-15 19:16

I am trying to make a map, where I can see my current location, and see what the street is called.

so far, I am able to put a pin on my map, but for some reason, I a

9条回答
  •  心在旅途
    2020-12-15 20:10

    In order to get the viewForAnnotation to be called, add mapView.delegate=self; to e.g. the viewDidLoad method:

    - (void)viewDidLoad {
    
        [super viewDidLoad];
        mapView.delegate=self;
    }
    

提交回复
热议问题