大佬教程收集整理的这篇文章主要介绍了在iOS上自定义用户位置色调,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
- (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMANnotation *)Annotation { if (Annotation.isUserLOCATIOnAnnotation) return nil; }
我也调查了this thread以了解我应该如何做类似的事情,但没有找到相同的用户位置代码. Apple是否使用静态PNG@L_616_7@查找我的朋友?通过将其更改为另一种颜色(如果可能的话),我是否会失去围绕该位置的自适应圆?
正如@Incanus在他的回复中所说,在我的 – [RMMapViewDelegate mapView:layerForAnnotation:]回调方法中,我应该得到三个对应于isUserLOCATIOnAnnotation = YES的调用 – 点,精度圆和脉冲晕.
我只得到一个,我不明白为什么.
此外,我尝试在跟踪模式更改时自定义注释,这是我所做的:
if (self.mMapView.userTrackingMode == RMUserTrackingModeNonE) { for (RMANnotation *Annotation in self.mMapView.Annotations) { if (Annotation.isUserLOCATIOnAnnotation) { if ([Annotation.AnnotationType isEqualTo@R_607_10495@ng:@"RMAccuracyCircleAnnotation"]) { [(RMCircle*)Annotation.layer setFillColor:[[UIColor redColor] colorWithAlphaComponent:0.6]]; [(RMCircle*)Annotation.layer removeAllAnimations]; } } } [self enableBouncingOnLayer:self.mMapView.userLOCATIOn.layer]; } else { [self.mMapView.userLOCATIOn.layer removeAnimationForKey:@"animateScale"]; }
到目前为止这么好,我得到蓝色精度圆圈变成红色并停止改变大小.
问题是,MapBox框架仍然会更新它,所以它将恢复正常.
有趣的是,使用这种方法,我确实有3个注释,isUserLOCATIOnAnnotation设置为YES,但我只得到一个回调.
任何帮助赞赏.
以上是大佬教程为你收集整理的在iOS上自定义用户位置色调全部内容,希望文章能够帮你解决在iOS上自定义用户位置色调所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。