         backgroundImageView.frame = bounds
         contentContainer.frame = CGRect(
             x: 0,
-            y: min(CGRectGetHeight(bounds) - contentHeight, CGRectGetMidY(bounds) - contentHeight / 2),
-            width: CGRectGetWidth(bounds),
+            y: min(bounds.height - contentHeight, bounds.midY - contentHeight / 2),
+            width: bounds.width,
             height: contentHeight
         )
-        shadowLayer.frame = contentContainer.bounds
+        // shadow should be visible outside of bounds during rotation
+        shadowLayer.frame = CGRectInset(contentContainer.bounds, -20, 0)
     }
 
     private func layoutToFit() {

        
        let progress = fractionRevealed()
        
//        CATransaction.setDisableActions(true)
//        shadowLayer.opacity = 1.0 - Float(progress)
//        CATransaction.setDisableActions(false)
        
        applyContentContainerTransform(progress)
    }

    }

    private func fractionRevealed() -> CGFloat {
        return min(bounds.height / contentHeight, 1)
    }

    // MARK: - Applyied Insets
