Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging View issue #29

Open
marcelocotrim opened this issue Jul 23, 2016 · 13 comments
Open

Dragging View issue #29

marcelocotrim opened this issue Jul 23, 2016 · 13 comments

Comments

@marcelocotrim
Copy link

Sometimes when dragging a view (presenting and dismissing), the app "freezes" and we can't navigate to other views.

@delphi-2015
Copy link

The same problem I had meet.
It happened when dragging fast from edge in you demo.
It "freezes" cause of the view above the windows like the image attached:
Could you help to fix it! Thanks a lot😃
wechatimg2

@bramroelandts
Copy link

I am having this exact same issue. Since this issue makes the library almost useless (it happens like 1 out of 3 times), would it be possible to fix this issue? I'd love to dig into the code and fix it myself, but I have no clue where to look..

Thanks a lot for the awesome library though!

@lkzhao
Copy link
Owner

lkzhao commented Feb 5, 2017

@brammahh Can you upload your project so I can checkout how you have implemented. I am not seeing this in the example project.

@bramroelandts
Copy link

Jurista.zip

In attachement, you can find my project. After clicking 'Start app', you can drag left and right for the menu's to appear. If you drag them fast enough one after the other, the app freezes from time to time.

Thanks in advance!

@JazzBallet
Copy link

I have the exact same problem as you. I can't seem to find a good way to reproduce it, but I happens often enough to make the app unsubmitable.
Unfortunately I don't have a clue so any suggestions is highly appreciated.

@lkzhao
Copy link
Owner

lkzhao commented Feb 8, 2017

I will reimplement this lib as as Hero plugin once Hero supports overFullScreen presentation. That would help eliminate these bugs and make it support navigationController. For now I don't have a work around.

@JazzBallet
Copy link

@lkzhao cool, thank you for the swift reply. Unfortunately, I'm not skilled enough to give any valuable input. It's just too bad I really like this transition and build my app around, but might need to find something else.

@anysome
Copy link

anysome commented May 16, 2017

I found that was because the animation completion block not been called, if dragging too fast or too often, and then transition did no clean works.
I add a timer to check it, but not a good idea.

@mrdavidrees
Copy link

@lkzhao Any chance you can look into this again? This issue has been around for more than a year now.

@mrdavidrees
Copy link

mrdavidrees commented Jul 31, 2017

@lkzhao

If this helps I think i've identified the issue and the fix:

 override func cancelInteractiveTransition(){
    super.cancelInteractiveTransition()
    let finalPoint = self.finalPoint(!presenting)

    print("running cancel animation")
    lc.m_animate("center", to: finalPoint, stiffness: animationSideStiffness, damping: animationDamping, threshold: animationThreshold)
    cc.m_animate("center", to: finalPoint, stiffness: animationCenterStiffness, damping: animationDamping, threshold: animationThreshold){
      self.cc.center = finalPoint
      self.lc.center = finalPoint
      self.updateShape()
      self.clean(false)
      print("cancel animation ran") //not being called because it's already a the final point
    }
    
    if cc.center == finalPoint {
        print("already there")
        self.cc.center = finalPoint
        self.lc.center = finalPoint
        self.updateShape()
        self.clean(false)
    }
  }

@MaisaMilena
Copy link

@mrdavidrees I used your code and totally worked! Thanks

LivioGama pushed a commit to LivioGama/ElasticTransition that referenced this issue Oct 4, 2017
@QuyetND
Copy link

QuyetND commented Oct 24, 2019

@lkzhao: Did you implement Elastic Transition is a part of Hero? I download it but no find Elastic mode in it.
I download Elastic Transition and convert it to swift 5 and fix some bug but still some bug about wrong frame (navigation and safe area update after viewcontroller showed) when present viewcontroller type top and bottom, but left and right work perfect.
transition.edge = .top
transition.startingPoint = (sender as AnyObject).center
performSegue(withIdentifier: topIdSegue, sender: self)
And some time viewcontroller frezze because of TransitionView in top layer (I fixed it follow other post issuse) but sometime it still frezze.
Sorry for my bad English.

@yunustek
Copy link

And some time viewcontroller frezze because of TransitionView in top layer (I fixed it follow other post issuse) but sometime it still frezze.

I agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants