     layoutMargins = UIEdgeInsetsZero
     
     // swipe gesture
-    swipe = UIPanGestureRecognizer(target: self, action:#selector(SwipeCell.handleSwipeGesture(_:)))
-    if let swipe = swipe {
+    swipeGesture = UIPanGestureRecognizer(target: self, action:#selector(SwipeCell.handleSwipeGesture(_:)))
+    if let swipe = swipeGesture {
       swipe.delegate = self
       addGestureRecognizer(swipe)
     }

      self.colorIndicatorView.backgroundColor = self.defaultColor
      self.iconView.alpha = 0
      self.swipeUpdateIcon(percentage: 0, direction: direction, icon: icon, isDragging: self.shouldAnimateIcons)
      }) { (finished) -> Void in
        if let completion = completion where !self.swipeGetBeforeTrigger(percentage: percentage, direction: direction) {
          completion(cell: self)
          self.swipeDealloc()
        } else {
          self.isExiting = false
        }
    }
  }
  

      self.swipeUpdateIcon(percentage: percentage, direction: direction, icon: icon, isDragging: self.shouldAnimateIcons)
      }, completion: {(finished: Bool) -> Void in
        completion(cell: self)
        // delay for animated swipe of cell
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.3 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) {
          self.swipeDealloc()
        }
    })
  }
  
  private func swipeDealloc() {
    swipeDelegate = nil
    swipeGesture = nil
    isExiting = false
    iconView.removeFromSuperview()
    colorIndicatorView.removeFromSuperview()
    contentScreenshotView.removeFromSuperview()
  }
  
  
