Closed inamiy closed 11 months ago
This PR adds customizability of background view via DrawerBackgroundConfiguration. Currently supporting DrawerBackgroundConfiguration.dark as a built-in style, and can be tested from Demo app.
DrawerBackgroundConfiguration
DrawerBackgroundConfiguration.dark
Also, this PR will supersede #63 by importing 3rd party dynamic blur view library e.g. https://github.com/efremidze/VisualEffectView and add the following configuration manually:
extension DrawerBackgroundConfiguration { public static func visualEffect(style: UIBlurEffectStyle, blurRadius: CGFloat) -> DrawerBackgroundConfiguration { return DrawerBackgroundConfiguration( make: { () -> VisualEffectView in let effect = UIBlurEffect(style: style) let blurView = VisualEffectView(effect: effect) return blurView }, handle: { $0.blurRadius = blurRadius * (1 - $1.currentY / $1.containerHeight) } ) } }
This PR adds customizability of background view via
DrawerBackgroundConfiguration
. Currently supportingDrawerBackgroundConfiguration.dark
as a built-in style, and can be tested from Demo app.Also, this PR will supersede #63 by importing 3rd party dynamic blur view library e.g. https://github.com/efremidze/VisualEffectView and add the following configuration manually: