My app takes user permission and move the map to the location. And at that position by default MapKit
add a blue icon which is generating some pulse.
I've searched around but I found how to add a 1000m circle around userLocation
. I don't want that. You can say I'm looking to customize the userLocation
default annotation
. The blue pulse it generates I want to increase that radius
. And when this blue pulse hits a custom annotation
there should be a method triggered. So how to achieve that?
相关问题
- 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
Unfortunately you cannot simply alter the behaviour of the standard annotation; you need to take over display of the annotation view yourself.
The user location is a map annotation of type
MKUserLocation
. If you implement theMKMapViewDelegate
methodviewForAnnotation
and the map is displaying the user's location then the delegate method will be called with an instance ofMKUserLocation
- your responsibility is to either returnnil
, in which case the standard annotation view will be displayed, or return an instance ofMKAnnotationView
which will be displayed instead.You can code something like:
As for performing some animation when the 'pulse' intersects another annotation, you will need to pass the other annotation locations to your pulsing view and check the coordinates when you run the animation.