我会假设这是某种形式的MKAnnotation,但我在文档中找不到任何解释这一点的内容.有谁知道这是怎么做的?
解决方法 您需要创建MKCircle叠加并将其中心坐标设置为与注释相同.例如:
//after adding the annotation at "coordinate",add the circle...MKCircle *circle = [MKCircle circleWithCenterCoordinate:coordinate radius:1000];[mapVIEw addOverlay:circle];//implement the vIEwForOverlay delegate method... -(MKOverlayVIEw *)mapVIEw:(MKMapVIEw *)mapVIEw vIEwForOverlay:(ID)overlay { MKCircleVIEw *circleVIEw = [[[MKCircleVIEw alloc] initWithOverlay:overlay] autorelease]; circleVIEw.strokecolor = [UIcolor redcolor]; circleVIEw.linewidth = 2; return circleVIEw;}总结
以上是内存溢出为你收集整理的iphone – 如何在注释周围添加圆作为半径全部内容,希望文章能够帮你解决iphone – 如何在注释周围添加圆作为半径所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)