-
Notifications
You must be signed in to change notification settings - Fork 129
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
Setting TZStackView to hidden inside animateAlongsideCoordinator's animation block causes strange behavior #50
Comments
rzulkoski
changed the title
Setting TZStackView to hidden inside animation block causes strange behavior
Setting TZStackView to hidden inside animateAlongsideCoordinator animation block causes strange behavior
Nov 2, 2015
rzulkoski
changed the title
Setting TZStackView to hidden inside animateAlongsideCoordinator animation block causes strange behavior
Setting TZStackView to hidden inside animateAlongsideCoordinator's animation block causes strange behavior
Nov 2, 2015
CosynPa
added a commit
to CosynPa/TZStackView
that referenced
this issue
Mar 5, 2016
…ixing tomvanzummeren#70 (Completion closure never called when animating showing/hiding) and tomvanzummeren#50 (Setting TZStackView to hidden inside animateAlongsideCoordinator's animation block causes strange behavior)
Fixed in #72 |
CosynPa
added a commit
to CosynPa/TZStackView
that referenced
this issue
Mar 5, 2016
…xing tomvanzummeren#70 (Completion closure never called when animating showing/hiding) and tomvanzummeren#50 (Setting TZStackView to hidden inside animateAlongsideCoordinator's animation block causes strange behavior)
CosynPa
added a commit
to CosynPa/TZStackView
that referenced
this issue
Mar 9, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have discovered a bug when attempting to set a TZStackView's hidden property during rotation. Specifically, I am attempting this inside of
viewWillTransitionToSize(size:coordinator)
'scoordinator.animateAlongsideTransition(animate:completion:)
's animation block.On the first rotation everything appears to work as expected. However, on all subsequent device rotations
viewWillTransitionToSize
is never called. I have tracked this issue down to this block of code inside of TZStackView.swift:It would seem that Apple is internally setting and relying on being the animationDelegate and setting an instance of TZStackView to the animationDelegate interferes with this. When I comment out every line except line 121 it works fine for the most part EXCEPT when animating hidden = true. This causes the view being hidden to hide immediately while the views around it properly animate to fill the empty space. I haven't gotten to the point where I understand exactly how you are orchestrating the animations yet so I'm afraid I don't have a suggestion as to how to fix the issue. Do you have any other methods at your disposal to accomplish whatever it is you are doing rather than setting yourself as the animation delegate? I'm looking forward to hearing your thoughts and I will continue to investigate the issue in the meantime.
I have uploaded a project demonstrating the bug to GitHub.
Thanks for your time and efforts.
/cheers
The text was updated successfully, but these errors were encountered: