Open kgrobelny-jobox opened 3 years ago
.superview
reference guide changes the behavior as you expected.
- .full: FloatingPanelIntrinsicLayoutAnchor(fractionalOffset: 0.0, referenceGuide: .safeArea)
+ .full: FloatingPanelIntrinsicLayoutAnchor(fractionalOffset: 0.0, referenceGuide: .superview)
https://github.com/scenee/FloatingPanel/blob/2.4.1/Examples/Samples/Sources/Layouts.swift#L40
It seems like there is something strange or buggy when using referenceGuide: .safeArea
.
Changing to referenceGuide: .superview
seems to give expected results. And in fact it seems like doing FloatingPanelIntrinsicLayoutAnchor(fractionalOffset: 0.0, referenceGuide: .superview)
as suggested above does in fact tie the used view to the bottom safe area, and not device edge.
Description
The height of the panel is calculated in an awkward way on different screen sizes. See the attached screenshot.
Expected behavior
The height of the panel is calculated consistently throughout the iPhone devices lineup.
Actual behavior
There are weird, bigger vertical spaces on devices with "safe area"
Steps to reproduce
Just run the Samples example and open an intrinsic panel by tapping on "Show Intrinsic View".
How do you display panel(s)?
How many panels do you displays?
Environment
Library version 2.4.1
Installation method
iOS version(s) any
Xcode version 12.5.1