Comments (6)
Hey @s951736
it should work fine, but it's hard to tell without more details. On top of my mind I could suggesting impelmenting the gesture's delegate method:
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer) {
return true
}
from bubbletransition.
Hello, I should provide more detail.
Now my project is pretty simple, there are only two VC in it, and first VC has a button which triggers the segue with bubble transition (just like the demo project). The second VC has an UITapGestureRecognizer that detect tap for the whole VC. I hope the second VC can start to detect user's tapping right after the button in first VC been pressed, even when the bubble animation is running. (Now the animation duration is set to 0.5 as default so in this period of time it can't receive user's tapping)
Sorry, I'm pretty new to coding, so I can't fully understand the method you provided above, I tried adding the code to second VC but it still not accept gesture while animating.
Any suggestion would be appreciated!
from bubbletransition.
In your second VC set the delegate of the gesture to self
, something like this:
someGesture.delegate = self
then add protocol conformity to your controller and add the aforementioned method. I like to do so in a separate extension at the bottom of the file:
extension SecondViewController: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
}
Change SecondViewController
with your controller's name
from bubbletransition.
Thanks for the reply.
I tried the code but it seems not working. The second VC conformed to UIGestureRecognizerDelegate itself, so I add the func to the VC directly without using the extension, here is the code:
//TapVC is the second VC
class TapVC: UIViewController, UIGestureRecognizerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap(sender:)))
tap.delegate = self
self.view.addGestureRecognizer(tap)
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
}
from bubbletransition.
Does the gesture work if you use a standard transition? Because I reckon this is not an issue with this lib.
from bubbletransition.
Closing this for inactivity, reopen if you have more info.
from bubbletransition.
Related Issues (20)
- self.transitioningDelegate not retained HOT 5
- present two viewControllers at once HOT 1
- How to use the bubble transition programmatically? HOT 2
- Improvement: Add a background image for the bubble as an alternative of bubbleColor HOT 4
- swift 4? HOT 6
- Unbalanced calls to begin/end appearance transitions for HOT 6
- Swipe down to dismiss HOT 4
- Swift4 + ObjC HOT 1
- Animation Controller for Dismissed Not work in iOS 9.3 & iOS 12 HOT 6
- can't dismiss viewcontroller in ios12 HOT 1
- Good
- update for swift 4.2? HOT 1
- Wrong Frame Starting Center when Translucent is False HOT 1
- Any chance of navigation instead of presenting?
- Cannot use BubbleInteractiveTransition HOT 4
- It is possible to use this library to add child view controller to a container view? HOT 4
- Button clicks or tableview cell selection not working HOT 2
- about `UIStatusBarStyle` HOT 2
- Support Swift Packages Manager HOT 1
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 bubbletransition.