MkMapView 的叠加层滚动不顺畅
通过覆盖 MkAnnotationViews 的绘图矩形,我使用 CoreGraphics 显示路径。我遇到的问题是,当我放大得非常近并滚动地图视图时,CoreGraphics 绘制的路径似乎非常跳跃,就好像它们仅在移动三个或更多像素后才更新。缩小时,滚动非常平滑,并且会反映到每个像素移位。在此滚动过程中不会调用drawrect函数,因为我假设mkmapkit只是在现有视图上应用翻译。有什么想法可以解决这个问题或者为什么会发生这种情况?
这是我发布的 YouTube 视频,展示了使用 iPhone 模拟器出现的问题。当然,我在实际设备上也遇到了同样的问题。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论