动画MKOverlayView [英] Animated MKOverlayView

查看:144
本文介绍了动画MKOverlayView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经跨越了几个有关收到一个动画MKOverlayView工作的财产不俗的表现(例如,动画雷达覆盖)在这里,类似的问题运行。然而,虽然答案已经帮助引导我正确的方向,我还没有完全掌握什么我失踪呢。

I've run across a couple of similar questions here regarding getting an animated MKOverlayView working property with decent performance (e.g., an animated radar overlay). However, while the answers have helped lead me in the right direction, I still don't fully grasp what I'm missing yet.

我一直试图让这种方法的UIImageView工作,这只是增加了一个的UIImageView作为MKOverlayView的子视图中,然后添加必要的图像中的动画序列,以其animationImages属性。这似乎并不为我工作为的UIImageView及其相关图像渲染从来没有。我甚至试过呼吁重叠视图也于事无补setNeedsDisplay。在我的情况下,在动画中使用的图像,必须从远程服务器第一次加载和被相当频繁更新。

I've been trying to get this UIImageView method working, which simply adds an UIImageView as a subview of the MKOverlayView, then adds the necessary images in the animation sequence to its animationImages property. This doesn't seem to work for me as the UIImageView and its associated images are never rendered. I've even tried calling setNeedsDisplay on the overlay view which also doesn't help. In my instance, the images used in the animation have to be loaded from a remote server first and are updated fairly frequently.

还有<一个href=\"http://stackoverflow.com/questions/7072105/objective-c-ipad-animation-with-large-images-what-method-to-use/7073581#7073581\">this那建议使用cocos2D上设置一个动画精灵,我想它,以避免如果与的UIImageView上面的方法成功地工作方法。

我一直在挣扎这两天直了,所以有可能的东西我完全失踪?我是否需要使用核芯显卡做绘图类似于它是如何在主drawMa preCT进行:zoomScale:inContext的:方法(我也试过,但没有工作)

I've been struggling with this for two days straight now, so there's likely something I'm totally missing? Do I need to use Core Graphics to do the drawing similar to how it's performed in the main drawMapRect:zoomScale:inContext: method (which I've also tried but didn't work)?

推荐答案

也许你可以试试这个。子类MKCircleView和动画添加一个UIImageView它与核心动画。它与地图与地图缩放及左右移动的规模和出效果很好。

Maybe you can try this. Subclass the MKCircleView and animate a UIImageView added on it with Core Animation. It works well with the map moving around and scale with the map zoom in and out.

HTTP://yickhong-ios.blogspot。 COM / 2012/04 /动画的圆上mkmapview.html

这篇关于动画MKOverlayView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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