DynamicOverlay
DynamicOverlay copied to clipboard
Notch.max based on the height of the overlay content
Hello,
Is there a way to set the max notch of the overlay to the height of the content inside the overlay?
Hi @kushsolitary, no you can't. But it could be implemented, we just need to add a case to NotchDimension
.
enum NotchReference {
case parent, overlay
}
extension NotchDimension {
/// Creates a dimension that is computed as a fraction of the height of the passed reference.
static func fractional(_ value: Double, reference: NotchReference = .parent) -> NotchDimension
}
Hi, are there any plans to add this?
Hi @ZachJiroun, unfortunately I didn't take the time to implement it. Would you like to try? :) It shouldn't be too hard. The hardest part is the testing.
I'll give it a try 😄