Closed Kevinw14 closed 5 years ago
Hi Kevin. If you are having problems configuring Jellies Interactive Transitions you could first take a look at the example app. Inside the MainViewController, there is function called setup
where interactive presentations are configured.
The Live Update API has nothing to do with interaction. Its main purpose is to update the presentation style of the viewcontroller you are presenting. Interaction will be configured using the interactionConfiguration Object.
InteractionConfiguration(presentingViewController: self, completionThreshold: 0.5, dragMode: .canvas)
If you use .canvas
dragMode, a simple Pan Gesture Recognizer will be added to the presented and presenting view controllers view directly.
If you use .edge
it will add a ScreenEdgePanGestureRecognizer to both.
The .name of the gesture recognizers is "JellyInteractivePanGestureRecognizer". I forgot to make this Property public. This will be fixed soon, for this period you could just use the string directly to identify the right recognizer.
I will also add the option to provide your own recognizer in one of the next versions. Currently this is not possible.
One thing you should also keep in mind is that user interaction has to be enabled on both views so that user input will be detected to the gesture recognizer.
https://developer.apple.com/documentation/uikit/uiview/1622577-isuserinteractionenabled
Pan gestures are finicky on the simulator especially the SE. I think that was the problem. Should have tested it on a device before creating an issue. Thanks for all your help though.
I'm trying to use the interactive transition to dismiss a view controller when swiping downward. I'm still a little confused to how to get access to the gesture recognizer. Am I suppose to use the new Live Update API in conjunction with the gesture recognizer, or what am I doing wrong?