Skip to content
Discussion options

You must be logged in to vote

If you're using the default FloatingPanelBottomLayout, and want the backdropView to always be visible (e.g. to block taps behind the panel), the cleanest way is to subclass it and override only backdropAlpha(for:).

import FloatingPanel

final class AlwaysVisibleBackdropLayout: FloatingPanelBottomLayout {
    override func backdropAlpha(for state: FloatingPanelState) -> CGFloat {
        return 0.3 // or any value > 0 to make it visible
    }
}

let fpc = FloatingPanelController()
fpc.layout = AlwaysVisibleBackdropLayout()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scenee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants