clipToBounds = NO时不绘制边界 [英] Not drawing outside bounds when clipToBounds=NO

查看:88
本文介绍了clipToBounds = NO时不绘制边界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在地图上绘制线,并且我注意到我的注释视图没有覆盖线的整个区域(这很好,只要我可以在视图的边界之外绘制)。

I am drawing lines on a map, and I notice that my annotation view isn't covering the entire area of the lines (which is fine, as long as I can draw outside the bounds of the view).

这是我所经历的事情的图片。注释视图的clipToBounds属性设置为NO,并且我在背景中添加了半透明的颜色,以便您可以查看视图的位置。
未在边界外绘制蓝线http://img.skitch.com/20100512- qdm18j7x42wptw3cumnr6h271q.jpg

Here is a picture of what I'm experiencing. The clipToBounds property is set to NO for the annotation view, and I've added a semi-transparent color to the background so you can see the position of the view. blue line not drawn outside bounds http://img.skitch.com/20100512-qdm18j7x42wptw3cumnr6h271q.jpg

图钉代表地图上的各个航路点。

The pins represent the various waypoints on the map.

我有做一些特殊的事情来使线条保持在视图范围之外?

Do I have to do something special to get the lines to keep drawing outside the bounds of the view?

推荐答案

您指的是什么线条?

无论如何,我认为答案应该是否,除非您要进行自定义绘制。

Anyway, I think the answer should be "no", unless you are doing custom drawing.

在在这种情况下,您需要确保每当需要绘制线条时都调用 [view setNeedsDisplay]

In that case, you need to make sure [view setNeedsDisplay] is being called whenever the lines need to be drawn.

这篇关于clipToBounds = NO时不绘制边界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆