Sometimes Hero.shared.end() ends the transitions but does not update the views to the current progress so it gets stuck and no userinteraction is available to dismiss the viewcontroller.
I have also tried using Hero.shared.end(animate:true), It freezes the app.
Can you give me more context? Is it in a navigation controller? Does it happen when user flicks very fast? One thing that might be causing this is that you called update(progress:) after you called end.
This is my handlePan method
`
Hero.shared.defaultAnimation = .fade
let translation = panGR.translation(in: nil)
let progress = -(translation.x / 2 / songImgVw.bounds.width)
switch panGR.state {
case .began:
_ = navigationController?.popViewController(animated: true)
case .changed:
let imagePosition = CGPoint(x: translation.x + songImgVw.center.x, y: songImgVw.center.y)
print(progress)
Hero.shared.update(progress: Double(progress))
Hero.shared.apply(modifiers: [.position(imagePosition)], to: songImgVw)
default:
if progress - panGR.velocity(in: nil).x / songImgVw.bounds.width > 0.3 {
Hero.shared.update(progress: Double(progress))
Hero.shared.end()
} else {
Hero.shared.cancel()
}
}
`
It is in a navigationController. I am pushing to the current viewController with collectionView didSelect method.
I have included a modifier of [.beginWithIfMatched(modifiers: [.zPosition(3)]), .arc] for the image to transition from viewcontrollers..
It happens only for some instances the total app freezes.
Thanks, I know whats happening if it is in a UINavigationController. I have seen this before. One more question, are you on the latest version? I remember trying to fix it a few commits back. But I am not sure if that fix was successful since it is hard to reproduce.
Yeah I am on the latest source file downloaded from github.
cool, thanks! I will try to fix it in the next version.
On Mon, Feb 13, 2017 at 11:03 AM Rozario Rapheal notifications@github.com
wrote:
Yeah I am on the latest source file downloaded from github.
—
You are receiving this because you commented.Reply to this email directly, view it on GitHub
https://github.com/lkzhao/Hero/issues/90#issuecomment-279435564, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADNEahlZIhS55Avq8XzzQh0pUA8qinD0ks5rcH6xgaJpZM4L_Moi
.
@Rozariozaro Can you try again with the latest master?
Yeah now it is working fine.. Thank you for solving this issue so swiftly.. Thumbs up..
Can you give us some more information about the fix for this? I am seeing the same thing. I have an interactive transition between view controllers, and sometimes the app just seems to freeze. It is like the transition has not ended and given back control.
I am having the same issue too.
emmmmm, I am having the same issue too.
I am experiencing this issue but it is fully re-creatable for me.
I have a collection view with images, when selected I unmark the previous heroID, and set the ID to the image that was clicked. I then push to a DetailViewController that inherits from tableView.
I have a gesture recognizer attached to this view so that I can still swipe back. I had to set the delegate of that recognizer to work simultaneously with the tableView's scroll gesture recognizer or else it wouldn't scroll.
If I scroll that view and then hit the "back" button, it freezes. Every time.
If I scroll that view and slide left a little, starting the transition some, and let it slide back and THEN hit the back button, it works just fine.
If I go to the detail view controller and don't scroll, it never freezes.
Most helpful comment
Can you give us some more information about the fix for this? I am seeing the same thing. I have an interactive transition between view controllers, and sometimes the app just seems to freeze. It is like the transition has not ended and given back control.