Не залезая в OpenGL (Quartz 2D в порядке):
Допустим, у меня есть изображение, которое я хочу плавно перемещать по карте. Например, изображение самолета, «летающего» по карте. Я смог сделать это, используя MKAnnotation, NSTimer и играя со скоростью изменения широты/долготы и скоростью таймера. Однако я предполагаю, что это не идеально, хотя результаты выглядят довольно прилично. Можете ли вы придумать лучший способ?
Теперь предположим, что я хочу, чтобы это изображение было анимировано (например, анимированный gif). Я не могу сделать обычный
UIImageView
с сериейanimationFrames
, потому что все, к чему у меня есть доступ в MKAnnotationView, этоUIImage
. Как бы вы, ребята, справились с этим?
Я понимаю, что № 2 можно обрабатывать с помощью UIImageView поверх карты, содержащей анимационные изображения. Однако тогда мне пришлось бы вручную переводить движение самолета, ракеты или чего-то еще, поскольку область просмотра карты менялась в зависимости от движений пользователя в реальном мире или масштабирования пользователя (прокрутка не разрешена в моем приложении).
Что вы думаете?