     
     func detectedPanGesture(gestureRecognizer : UIPanGestureRecognizer) {
         
-        let locationInView = gestureRecognizer.locationInView(currentTopView)
+        guard currentInteractingView != nil else { return }
+        
+        let swipeableView = currentInteractingView!
+        let locationInView = gestureRecognizer.locationInView(swipeableView)
      
         switch gestureRecognizer.state {
             
         case .Began:
             
-            if !isAnimating && CGRectContainsPoint(currentTopView.bounds, locationInView){
-                currentBottomView.userInteractionEnabled = false
+            if !isAnimating && CGRectContainsPoint(swipeableView.bounds, locationInView){
+                disableUserInteractionForUnderlyingViews()
                 animator.removeAllBehaviors()
                 itemBehavior = nil
-                attachmentBehavior = UIAttachmentBehavior(item: currentTopView, offsetFromCenter: UIOffsetMake(locationInView.x - currentTopView.bounds.size.width/2, locationInView.y - currentTopView.bounds.size.height/2), attachedToAnchor: gestureRecognizer.locationInView(self))
+                attachmentBehavior = UIAttachmentBehavior(item: swipeableView, offsetFromCenter: UIOffsetMake(locationInView.x - swipeableView.bounds.size.width/2, locationInView.y - swipeableView.bounds.size.height/2), attachedToAnchor: gestureRecognizer.locationInView(self))
                 animator.addBehavior(attachmentBehavior!)
                 isDragging = true
                 

        view.frame = self.bounds;
    }
    
    private func cacheItemView(itemView : UIView){
        let identifier = NSStringFromClass(itemView.dynamicType)

        if let itemsForIdentifier = cachedViews[identifier] {

            }
            isDragging = false
            isAnimating = true
            swipeableView.userInteractionEnabled = false
            
            let velocity = gestureRecognizer.velocityInView(self)
            let minVelocityMagnitude : Float = 450
            let velocityMagnitude = sqrtf(Float(velocity.x*velocity.x + velocity.y*velocity.y))
            
            if velocityMagnitude >= minVelocityMagnitude {
                itemBehavior = UIDynamicItemBehavior(items: [swipeableView])
                itemBehavior!.resistance = 1
                itemBehavior!.angularResistance = 1

                itemBehavior!.action = { [unowned self] in
                        
                    let galleryRootView = self.rootView()
                    let topViewFrameOnScreen = self.convertRect(swipeableView.frame, toView: galleryRootView)
                    
                    if (self.viewsDisappearImmediately && !CGRectIntersectsRect(self.bounds, swipeableView.frame)) || (!CGRectIntersectsRect(galleryRootView.bounds, topViewFrameOnScreen)) {
                        
                        self.animator.removeAllBehaviors()
                        self.isAnimating = false
                        self.currentIndex += 1
                        self.switchViews()
                        
                        if self.currentIndex < self.numberOfItems {
                            self.delegate?.swipeRevealGallery?(self, didRevealItemAtIndex: self.currentIndex)
