         return collectionView?.indexPath(for: self)
     }
     
+    var isIpadOrLandscape: Bool {
+        return UIDevice.current.userInterfaceIdiom == .pad ||
+            UIDevice.current.orientation == .landscapeLeft ||
+            UIDevice.current.orientation == .landscapeRight
+    }
+    
+    var leftViewToCoverCellOnLandscape: UIView?
+    var righttViewToCoverCellOnLandscape: UIView?
+
+    
     func openActionPane() {
         // Make sure we don't swipe twice on the same cell.
         guard let actionsView = actionsView, swipeTranslation >= 0 else { return }

            let totalDistance = swipeTranslation - targetTranslation
            let duration: CGFloat = 0.40
            let springVelocity = abs(swipeVelocity) * duration / totalDistance
            
            UIView.animate(withDuration: TimeInterval(duration), delay: 0, usingSpringWithDamping: 10, initialSpringVelocity: springVelocity, options: .beginFromCurrentState, animations: {
                self.swipeTranslation = targetTranslation
                self.layoutIfNeeded()
            }, completion: { (finished: Bool) in

        
    }
    
    func closeActionPane() {
        
        let targetTranslation = swipeType == .primary ? -swipeTranslation : swipeTranslation
        
        let totalDistance = targetTranslation
