     }
 
     private func fractionRevealed() -> CGFloat {
-        return min(CGRectGetHeight(bounds) / contentHeight, 1)
+        return min(bounds.height / contentHeight, 1)
     }
 
     // MARK: - Applyied Insets

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

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

    private func layoutToFit() {
