Comments (5)
Thanks for your request. I'm considering enabling to assign an instance of a custom BackdropView.
[Added]
I've created iss-614 branch to enable to use a custom backdrop view. I also added a custom backrdop view with blur in the Samples example. Just check it.
from floatingpanel.
Thanks ππ»
In this way some more custom behaviour can be added like I did mention in my first post.
In fact I had to override the pod class for the background view to add some code to send the gesture to the parent view controller.
from floatingpanel.
I had, for now, import brutally the pod into the project and updated the backdropview as the follow, maybe you can have some better ideas how to propagate the gesture in the presenting viewcontroller
public var dismissalTapGestureRecognizer: UITapGestureRecognizer!
public var notification: Notification.Name?
public var presentingViewcontroller: UIViewController?
override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
// little hack to fire back to the floatingpanel controller an extra action, like dismiss the floating panel
// and at the same time let the event be trig in the presented viewcontroller
if let pvc = presentingViewcontroller {
if let n = notification {
NotificationCenter.default.post(name: n, object: nil)
}
return pvc.view.hitTest(point, with: event)
}
// 1
if !self.isUserInteractionEnabled || self.isHidden || self.alpha == 0 {
return nil
}
//2
var hitView: UIView? = self
if !self.point(inside: point, with: event) {
if self.clipsToBounds {
return nil
} else {
hitView = nil
}
}
//3
for subview in self.subviews.reversed() {
let insideSubview = self.convert(point, to: subview)
if let sview = subview.hitTest(insideSubview, with: event) {
return sview
}
}
return hitView
}
}
from floatingpanel.
Thanks for your request. I'm considering enabling to assign an instance of a custom BackdropView.
[Added]
I've created iss-614 branch to enable to use a custom backdrop view. I also added a custom backrdop view with blur in the Samples example. Just check it.
Nice, when will you merge into master
?
from floatingpanel.
I will release the BackdropView
update in v2.8.2. Thanks.
from floatingpanel.
Related Issues (20)
- Issues after migrating to 2.0 HOT 1
- Transition to layout with a single anchor breaks panel behavior HOT 2
- Dismiss action does not remove contentViewController? HOT 2
- I can't find version 2.8.0 in pod search
- cannot respond to the didSelectItemAt | didSelectRowAt method
- Change backdropAlpha for FloatingPanelLayout blocks parent ViewController
- Small Devices (iPhone SE) Library won't add space for grabber HOT 3
- Second floating panel doesn't update to width of landscape view HOT 3
- SWIFTUI supports
- Is it possible to disable attraction between anchors? HOT 1
- Any support of Privacy Manifest? HOT 2
- γFixedγiPhone SE 2nd scroll lock HOT 1
- [SwiftUI] UIViewControllerRepresentable HOT 1
- Adaptive Layout doesn't work with compositional layout of collection view HOT 4
- Tracking WebView is broken in iOS 17.4.x HOT 6
- SWIFTUI - scroll issue
- Strange scrolling behavior - all content of the FloatingPanel is scrolling HOT 3
- Release 2.8.2 presents error in Xcode 16 beta: 'CALayerCornerCurve' is only available in iOS 13.0 or newer HOT 2
- Crash in file Core.swift
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from floatingpanel.