是否有任何方法可以将大型注释调整为与左ones.It相同的iOS11行为,我希望像以前一样为所有注释提供唯一的大小。

提前感谢
发布于 2017-12-04 10:46:31
这就是我为我的项目所做的。
在委托方法
- (MKAnnotationView *) mapView:(MKMapView *)mapView1 viewForAnnotation:(id <MKAnnotation>) annotation1)创建注释视图
MKAnnotationView *annView = [[MKAnnotationView alloc] initWithAnnotation:currentAnnotation reuseIdentifier:@"Cluster"];2)设置帧和其他属性
[annView setFrame:CGRectMake(0, 0,100,100)]; //(Important)
annView.canShowCallout = YES;
[annView setCenterOffset:CGPointMake(0, -18)];3)添加相同帧大小的子视图图像视图。
UIImageView *homeImage = [[UIImageView alloc] initWithImage:[UIImage cachedImage:@"GroupPin"]];
[homeImage setFrame:CGRectMake(0, 0,100,100)]; //(Important)
[annView addSubview:homeImage];
return annView;你就完蛋了。
https://stackoverflow.com/questions/47592527
复制相似问题