MGSwipeTableCell icon indicating copy to clipboard operation
MGSwipeTableCell copied to clipboard

Swiping stops working after reloading table

Open KrzysztofKowalskiKainos opened this issue 10 years ago • 6 comments

Hi, sometimes (eg. when after swiping cell occurs reload on containing table or when I swipe a lot ;) ) swiping functionality crashes.

XCode console shows this message: unexpected nil window in _UIApplicationHandleEventFromQueueEvent, _windowServerHitTestWindow: <UIWindow: 0x7d1559e0; frame = (0 0; 768 1024); userInteractionEnabled = NO; gestureRecognizers = <NSArray: 0x7d1561e0>; layer = <UIWindowLayer: 0x7d155bd0>>

Do you know possible issue/solution? I was running code in simulator with iOS 8.1

KrzysztofKowalskiKainos avatar Feb 25 '15 16:02 KrzysztofKowalskiKainos

I saw this a few times here, too, but i was never able to reproduce this issue. My first idea was that something like this happens if you have one cell has buttons visible and then a reloadData on the tableView occures. So i triggered this manually and could not reproduce this :(

senfi avatar Mar 06 '15 14:03 senfi

In my case while the user is swiping a table cell, when [tableView reloadData] occurs, swiping stops working.

starikovvm avatar May 25 '15 08:05 starikovvm

Fixed this by adding following code before [tableview reloadData]:

for (UIView *view in self.tableView.subviews) {
        for (UIView *cell in view.subviews) {
            for (UIGestureRecognizer* gr in cell.gestureRecognizers) {
                gr.enabled = NO;
                gr.enabled = YES;
            }
        }
    }

starikovvm avatar May 25 '15 09:05 starikovvm

It should be fixed in 1.5.4

MortimerGoro avatar Mar 20 '16 22:03 MortimerGoro

Is this issue fixed?

swathi1606 avatar Apr 25 '16 18:04 swathi1606

doesn't work in 1.5.5+ after reloadData

ypaulovich avatar Jun 29 '16 14:06 ypaulovich