SebastianBoldt / Jelly

🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.
http://www.sebastianboldt.com/
MIT License
2.45k stars 123 forks source link

I encountered a problem that the system return gesture is missing #78

Open sea7reen opened 4 years ago

sea7reen commented 4 years ago

In my project. I am using jelly to present some control pages. After control diss, after returning to the current page, The side swipe gesture on the current page is invalid. Excuse me, how to solve this problem.

SebastianBoldt commented 4 years ago

Hard to tell whats going on without seeing any code. Did you try to debug the code?

sea7reen commented 4 years ago

Hard to tell whats going on without seeing any code. Did you try to debug the code?

this is my code.

    let agoraUserVC = QWAgoraUserViewController()
    agoraUserVC.uid = uid
    let animator = JellyAnimator(presentation: qw_jellySlide(TabBarMargin + 200))
    animator.prepare(presentedViewController: agoraUserVC)
    present(agoraUserVC, animated: true, completion: nil)

func qw_jellySlide(_ h: CGFloat) -> JellySlideInPresentation {
    let configuration = PresentationUIConfiguration(cornerRadius: 4, backgroundStyle: .dimmed(alpha: 0.39), isTapBackgroundToDismissEnabled: true, corners: [.layerMinXMinYCorner, .layerMaxXMinYCorner])
    let presentation = JellySlideInPresentation.init(directionShow: .bottom, directionDismiss: .bottom, uiConfiguration: configuration, size: PresentationSize(width: .fullscreen, height: .custom(value: h)), alignment: PresentationAlignment.init(vertical: .bottom, horizontal: .center), marginGuards: UIEdgeInsets.zero, timing: PresentationTiming(), spring: .none, interactionConfiguration: InteractionConfiguration.init(presentingViewController: self, dragMode: .canvas))
    return presentation
}

when I transfer funcation dismiss(animated: true, completion: nil) The current ViewController,The system sliding back gesture is invalid。 It means the gesture return is invalid  

DIANGHONG commented 3 years ago

Hard to tell whats going on without seeing any code. Did you try to debug the code?

this is my code.

    let agoraUserVC = QWAgoraUserViewController()
    agoraUserVC.uid = uid
    let animator = JellyAnimator(presentation: qw_jellySlide(TabBarMargin + 200))
    animator.prepare(presentedViewController: agoraUserVC)
    present(agoraUserVC, animated: true, completion: nil)

func qw_jellySlide(_ h: CGFloat) -> JellySlideInPresentation {
    let configuration = PresentationUIConfiguration(cornerRadius: 4, backgroundStyle: .dimmed(alpha: 0.39), isTapBackgroundToDismissEnabled: true, corners: [.layerMinXMinYCorner, .layerMaxXMinYCorner])
    let presentation = JellySlideInPresentation.init(directionShow: .bottom, directionDismiss: .bottom, uiConfiguration: configuration, size: PresentationSize(width: .fullscreen, height: .custom(value: h)), alignment: PresentationAlignment.init(vertical: .bottom, horizontal: .center), marginGuards: UIEdgeInsets.zero, timing: PresentationTiming(), spring: .none, interactionConfiguration: InteractionConfiguration.init(presentingViewController: self, dragMode: .canvas))
    return presentation
}

when I transfer funcation dismiss(animated: true, completion: nil) The current ViewController,The system sliding back gesture is invalid。 It means the gesture return is invalid

animator

Hard to tell whats going on without seeing any code. Did you try to debug the code?

this is my code.

    let agoraUserVC = QWAgoraUserViewController()
    agoraUserVC.uid = uid
    let animator = JellyAnimator(presentation: qw_jellySlide(TabBarMargin + 200))
    animator.prepare(presentedViewController: agoraUserVC)
    present(agoraUserVC, animated: true, completion: nil)

func qw_jellySlide(_ h: CGFloat) -> JellySlideInPresentation {
    let configuration = PresentationUIConfiguration(cornerRadius: 4, backgroundStyle: .dimmed(alpha: 0.39), isTapBackgroundToDismissEnabled: true, corners: [.layerMinXMinYCorner, .layerMaxXMinYCorner])
    let presentation = JellySlideInPresentation.init(directionShow: .bottom, directionDismiss: .bottom, uiConfiguration: configuration, size: PresentationSize(width: .fullscreen, height: .custom(value: h)), alignment: PresentationAlignment.init(vertical: .bottom, horizontal: .center), marginGuards: UIEdgeInsets.zero, timing: PresentationTiming(), spring: .none, interactionConfiguration: InteractionConfiguration.init(presentingViewController: self, dragMode: .canvas))
    return presentation
}

when I transfer funcation dismiss(animated: true, completion: nil) The current ViewController,The system sliding back gesture is invalid。 It means the gesture return is invalid

image

If you read the documentation carefully, you won’t have this problem