SwiftUI MapKit search

In the Maps app, when we search for the location

let request = MKLocalSearch.Request()
request.region = // ???

The app automatically searches again when we scroll the map to the other region. How to do it?

  • Setting the region to the current view of the map
  • Tracking map scrolling start and finish
SwiftUI MapKit search
 
 
Q