Mapview shows White overlay on Interaction

吃可爱长大的小学妹 提交于 2021-02-10 05:46:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!