在我的viewWillAppear中我有一个视图
MKPointAnnotation *point = [[MKPointAnnotation alloc] init];
[point setCoordinate:(myLocation)];
[point setTitle:@"Here it is!"];
[mapView addAnnotation:point];
[mapView setRegion:adjustedRegion animated:YES];
Run Code Online (Sandbox Code Playgroud)
这就像我想要的那样为地图增加了一点.但是我必须点击它才能看到标注.
如何默认显示标注?
我尝试在以下之后添加:
[self.mapView selectAnnotation:annotation animated:YES];
但它似乎没有用......我必须使用真正的注释而不是MKPointAnnotation来做到这一点吗?
QED*_*QED 15
您point没有为注释命名annotation:
[mapView selectAnnotation:point animated:YES];
Run Code Online (Sandbox Code Playgroud)
它发生在我们最好的人身上.
| 归档时间: |
|
| 查看次数: |
7318 次 |
| 最近记录: |