使用 MapKit 和 SwiftUI(版本 12.0 beta 2 (12A6163b))放大/缩小地图时,终端会生成数百条这样的行:
2020-07-21 21:05:39.310719-0500 MyApp[95733:4195994] [VKDefault] 为不可见的矩形请求样式 Z
import SwiftUI
import MapKit
@main
struct MapTest: App {
var body: some Scene {
WindowGroup {
MapView()
}
}
}
struct MapView: View {
var body: some View {
Map()
}
}
struct MapView_Previews: PreviewProvider {
static var previews: some View {
MapView()
}
}
struct Map: UIViewRepresentable {
func makeUIView(context: Context) -> MKMapView {
let map = MKMapView()
map.delegate = context.coordinator
return map
}
func updateUIView(_ uiView: MKMapView, context: Context) {}
func makeCoordinator() -> Coordinator {
Coordinator(self)
}
final class Coordinator: NSObject, MKMapViewDelegate {
var control: Map
init(_ control: Map) {
self.control = control
}
}
}
我该如何解决?