Reported as FB20357097
In SwiftUI, an empty .safeAreaInset
modifier attached to a Map
causes the map to become zoomed out to planet level.
Minimal reproduction:
import SwiftUI
import MapKit
@main
struct map_region_safe_area_inset_bugApp: App {
var body: some Scene {
WindowGroup {
Map {
// Any Map content
MapCircle(center: .init(latitude: 35.6895, longitude: 139.6917), radius: 1000)
}
.safeAreaInset(edge: .top) {
// No content, `EmptyView()`, `Color.clear`
}
}
}
}
Note: ZStack { }
inside the safeAreaInset
prevents the bug.