I've been trying to add an MKOverlay to a map with animation. I'm trying to make it fade in when it's added and fade out when it's removed. Could this be done by created a custom overlay class or overlay view class?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How can I add media attachments to my push notific
This is trickier in iOS 7 and above since the overlays aren't represented with views anymore, but rather drawn with renderers (either using the stock ones or rendering yourself in a provided
CGContext
in the delegate).Whatever you do here will be rendered on a tiled basis, which could lead to differences in appearance across you map view.
You can read more on this here: https://github.com/mapbox/mbxmapkit/issues/39
On iOS 7 you could achieve this even with the new
MKOverlayRenderer
. It has analpha
property which you could animate by setting up a timer to repeatedly change its value and callsetNeedsDisplayInMapRect:zoomScale:
.