Animated gif not working in MKMapView overlay using MKOverlayRenderer

后端 未结 2 1696
感情败类
感情败类 2020-11-29 07:47

I am trying to display an animated gif in an overlay for MKMapView. The overlay is created using the MKOverlayRenderer. To animate the gif in iOS

相关标签:
2条回答
  • 2020-11-29 08:13

    Because a map view overlay is having your draw in a CGContext, it won't animate -- that is a buffer which is drawn to and translated to view contents, as opposed to being a normal part of the view hierarchy. Unfortunately you will need to make use of -setNeedsDisplayInMapRect:zoomScale: repeatedly to request animations. This system is a bit less flexible than iOS 6 and before, which added normal views atop the map.

    0 讨论(0)
  • 2020-11-29 08:33

    https://github.com/jhurray/iOS7AnimatedMapOverlay

    this is the best way to animate overlays in iOS7

    0 讨论(0)
提交回复
热议问题