scenee / FloatingPanel

A clean and easy-to-use floating panel UI component for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dismissalTapGestureRecognizer dont work when panel attached to window

CaramelHeaven opened this issue · comments

Example code

            let fpc = FloatingPanelController()
            fpc.backdropView.dismissalTapGestureRecognizer.isEnabled = true
            fpc.delegate = self
            fpc.contentInsetAdjustmentBehavior = .always
            fpc.set(contentViewController: contentVC)
            
            let window = UIApplication.shared.windows.first
            window?.addSubview(fpc.view)

            fpc.view.snp.makeConstraints { make in
                make.top.left.right.bottom.equalToSuperview()
            }

            fpc.show(animated: true)

Can we add option to handle gesture when we use window ? )

The library doesn't expect this use case but I fixed this issue locally and I'm going to make a pull request. Thanks.