Tapping the pulsating blue circle representing the userLocation brings up a "Current Location" callout. Is there a way to suppress that?
相关问题
- 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
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
Swift 4
Swift 4 - Xcode 9.2 - iOS 11.2
SWIFT Version
We need to set the user
MKAnnotationView
propertycanShowCallout
to false whenmapView
adds the user MKAnnotationViewI have two ways to help you:
suppress in the mapViewDidFinishLoadingMap
}
suppress in the didUpdate
You can set the
title
to blank to suppress the callout:Edit:
A more reliable way might be to blank the title in the
didUpdateUserLocation
delegate method:or in
viewForAnnotation
:Setting the title in the delegate methods lets you be certain you have a real userLocation instance to work with.
There's a property on the annotation view you can change, once the user location has been updated: