问题
I am using GMSMapView with SwiftUI, in map-view I have to display some markers with lat and long. Upon clicking any marker I have to Move to another view. I am doing this by putting MapView in NavigationLink. This thing is working fine By using code.
NavigationView {
NavigationLink(destination: Text(""), isActive: $abc) {
MapView().edgesIgnoringSafeArea(.all)
}
}
And the issue is NavigationLink, after putting mapview in NavigationLink every-time when i interact with map, white overlay blinks. White overlay shows over complete map and Images are attached with and without overlay.
Screenshot without overlay
Screenshot with overlay
回答1:
Use instead
NavigationView {
MapView().edgesIgnoringSafeArea(.all)
.background(NavigationLink(destination: Text(""),
isActive: $abc) { EmptyView() })
}
来源:https://stackoverflow.com/questions/62444645/mapview-shows-white-overlay-on-interaction