Open emorydunn opened 4 years ago
@emorydunn Could you give me some more detail on what you are trying to do? Are you using and iPhone or iPad? Landscape or portrait orientation? When you say "swipe actions" is this on the timeline (the listing of articles)?
Thanks for reporting this. I just need some additional info to know if this is something we can fix or not.
If you use the swipe actions in MasterTimelineViewController
to mark an article read/ unread you can't select another article until the cell finishes animating back into place. It occurs in both landscape and portrait, and on iPhone and iPad.
I tested the same action in Mail (which uses the same leading swipe to toggle read status) and you can select a message while the cell finishes its animation, so hopefully it's possible.
I see what you are trying to do now.
I'm not sure we are going to be able to fix this one. I have no idea how Mail is pulling it off. The animation happens after we call the completion handler on the swipe context action, so we aren't blocking anything there.
Basically between the time that we call that completion handler and the didSelectRowAt
getting everything happens in UIKit and outside our code. If there is a configuration option that allows you to select during the animation, I haven't found it.
I'm leaving this issue open for now incase I learn more about the problem and can resolve it.
As I mentioned in the Slack channel: After more tinkering, the only thing I discovered is calling tableView.setEditing(false, animated: false) inside the block of swipe actions makes the other cells selectable before the animation is finished. This only works if the swipe action was triggered. If you dismiss the swipe action, the other cells still stay non-selectable until the animation completed. In Mail.app you can already select another cell, even in the dismiss case. I have a branch on my fork if someone wants to give it a try. (https://github.com/hartlco/NetNewsWire/tree/1456-swipe-animation-blocks-selecting-another-article) I’m not convinced that this is actually a good solution but it’s the only thing I found.
I suspect there isn’t a way to do this without writing our own version of under-the-cell actions.
I’m moving this out of the milestone, but keeping it open.
When using the swipe actions on an article you can’t select another article in the table view until the animation has completed. Other UI elements remain interactive.