当 ClipToBounds=NO 时不绘制外部边界
我正在地图上绘制线条,我注意到我的注释视图没有覆盖线条的整个区域(这很好,只要我可以在视图边界之外绘制)。
这是我正在经历的事情的图片。对于注释视图,clipToBounds 属性设置为 NO,并且我在背景中添加了半透明颜色,以便您可以看到视图的位置。 蓝线未绘制在边界之外 http://img.skitch.com/20100512-qdm18j7x42wptw3cumnr6h271q.jpg< /a>
图钉代表地图上的各个航路点。
我是否需要做一些特殊的事情才能让线条继续在视图边界之外绘制?
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).
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你指的是哪几行?
不管怎样,我认为答案应该是“不”,除非你正在做自定义绘图。
在这种情况下,您需要确保每当需要绘制线条时都调用
[view setNeedsDisplay]
。What lines are you referring to?
Anyway, I think the answer should be "no", unless you are doing custom drawing.
In that case, you need to make sure
[view setNeedsDisplay]
is being called whenever the lines need to be drawn.