-
-
Notifications
You must be signed in to change notification settings - Fork 531
Description
Description
This concerns the Maps-SwiftUI proof of concept. If I replace the Map view with a VStack containing 3 labels, some of these labels appear above the floating panel (see pics)

Expected behavior
The FloatingPanelView.content view should be completely behind the floating panel.
Actual behavior
Some children of the FloatingPanelView.content appear on top of the floating panel
Steps to reproduce
Code example that reproduces the issue
In Maps-SwiftUI/Maps/ContentView.swift
struct ContentView: View {
// ...
var body: some View {
ZStack {
// Replace this:
// Map(coordinateRegion: $region)
// .ignoresSafeArea()
// With this:
VStack {
Text("Why is this visible?")
Text("Why is this visible?")
Text("Why is this visible?")
}
statusBarBlur
}
}
}
How do you display panel(s)?
- Add as child view controllers
How many panels do you display?
- 1
Environment
Library version
2.5.2
Installation method
Swift Package Manager
iOS version(s)
15.4
Xcode version
13.3
Possible fix
I noticed that changing the following line in FloatingPanelView.Coordinator.setupFloatingPanel(_:UIViewController) fixes the problem:
// Change this:
// fpc.addPanel(toParent: parentViewController, at: 1, animated: false)
// to this:
fpc.addPanel(toParent: parentViewController, animated: false)
I'm not familiar with this component well-enough to know that it's an acceptable fix