-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Smarter table view row deselection #405
Comments
My gist also assumes that you're being dismissed in a navigation controller, which may not be the case always. |
@ZevEisenberg Thanks for reporting the issue and provide info to solve it. It seems related with #402. I will look into it and get back to you shortly. |
I have not tested this in a simulator neither in a real device but it seems to me it should work for any transition even custom transitions. Why did you say "My gist also assumes that you're being dismissed in a navigation controller" ? |
@mtnbarreto in the original gist that I linked to, the function takes a navigation controller. When I submitted my PR, I tried using |
Before submitting issues ...
The code in question is here, in
FormViewController
fromCore.swift
. I'm looking at the version onmaster
at the time of this writing, which is from commit 826d8d9The problem with this is that if you use an interactive transition to start dismissing the pushed view (so that
self
is reappearing), and then change your mind and cancel the dismissal, the row is still deselected, a subsequent "Back" navigation doesn't show the row deselecting again.The solution is to use the trick that I outline here: https://gist.github.com/ZevEisenberg/8951478e8c6907bd5e5a
The idea is that you use the transition coordinator to find out if the animation was canceled, and if it was, it reselects the desired rows so that they will still be selected on subsequent dismissal attempts.
The text was updated successfully, but these errors were encountered: