2 seconds was too fast, set peripheral scanning time to 4 seconds

This commit is contained in:
Garth Vander Houwen 2022-06-15 23:16:29 -07:00
parent 31093f52eb
commit b1a7f24200
3 changed files with 14 additions and 12 deletions

View file

@ -331,23 +331,18 @@ public struct MapView: UIViewRepresentable {
// Make a fast exit if the annotation is the `MKUserLocation`, as it's not an annotation view we wish to customize.
return nil
}
var annotationView: MKAnnotationView?
//var annotationView: MKAnnotationView?
if let annotation = annotation as? PositionAnnotation {
let identifier = NSStringFromClass(PositionAnnotationView.self)
//let annotationView = mapView.dequeueReusableAnnotationView(withIdentifier: identifier) as? PositionAnnotationView ?? PositionAnnotationView()
let annotationView = PositionAnnotationView(annotation: annotation, reuseIdentifier: "PositionAnnotation")
annotationView.name = annotation.shortName ?? "???"
annotationView.name = annotation.shortName ?? "????"
annotationView.canShowCallout = true
return annotationView
}
return annotationView
return nil
}
public func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {