Swiping stops working after reloading table
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
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 :(
In my case while the user is swiping a table cell, when [tableView reloadData] occurs, swiping stops working.
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;
}
}
}
It should be fixed in 1.5.4
Is this issue fixed?
doesn't work in 1.5.5+ after reloadData