Browse Source

fix memory swipe

Marino Faggiana 7 years ago
parent
commit
b9c1c05c37
1 changed files with 5 additions and 1 deletions
  1. 5 1
      iOSClient/Main/CCMain.m

+ 5 - 1
iOSClient/Main/CCMain.m

@@ -4154,7 +4154,9 @@
 
 -(void)swipeTableCell:(nonnull MGSwipeTableCell *)cell didChangeSwipeState:(MGSwipeState)state gestureIsActive:(BOOL)gestureIsActive
 {
-    //
+    if (state == MGSwipeStateNone) {
+        NSLog(@"done");
+    }
 }
 
 - (BOOL)swipeTableCell:(MGSwipeTableCell *)cell tappedButtonAtIndex:(NSInteger)index direction:(MGSwipeDirection)direction fromExpansion:(BOOL)fromExpansion
@@ -5393,8 +5395,10 @@
     CGFloat swipeOffset = [[_statusSwipeCell objectForKey:indexPath] doubleValue];
     if (swipeOffset < 0) {
         [cell showSwipe:MGSwipeDirectionRightToLeft animated:NO];
+        [_statusSwipeCell removeObjectForKey:indexPath];
     } else if (swipeOffset > 0) {
         [cell showSwipe:MGSwipeDirectionLeftToRight animated:NO];
+        [_statusSwipeCell removeObjectForKey:indexPath];
     }
     
     return cell;