MkMapView 的叠加层滚动不顺畅

发布于 2024-08-29 14:05:23 字数 431 浏览 1 评论 0原文

通过覆盖 MkAnnotationViews 的绘图矩形,我使用 CoreGraphics 显示路径。我遇到的问题是,当我放大得非常近并滚动地图视图时,CoreGraphics 绘制的路径似乎非常跳跃,就好像它们仅在移动三个或更多像素后才更新。缩小时,滚动非常平滑,并且会反映到每个像素移位。在此滚动过程中不会调用drawrect函数,因为我假设mkmapkit只是在现有视图上应用翻译。有什么想法可以解决这个问题或者为什么会发生这种情况?

这是我发布的 YouTube 视频,展示了使用 iPhone 模拟器出现的问题。当然,我在实际设备上也遇到了同样的问题。

http://www.youtube.com/watch?v=AvWx5Yz4oxI

By overriding the drawrect of my MkAnnotationViews, I am displaying paths using CoreGraphics. The problem I have is when I zoom in pretty close and scroll the map view, the paths drawn by CoreGraphics seem to be really jumpy, as if they are updated only after a shift of three or more pixels. When zoomed out, the scrolling is perfectly smooth and is reflected for each pixel shift. The drawrect function is not called during this scrolling as I assume mkmapkit is just applying translations on the existing views. Any ideas how to smooth this out or why this is happening?

Here is a youtube video that I posted showing the issue using the iphone simulator. Of course, I have the same problem on the actual device as well.

http://www.youtube.com/watch?v=AvWx5Yz4oxI

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文