 
     // MARK: Layout
 
+    /// Content offset - changes when swiping
+    public var contentOffset = CGFloat(0) {
+        didSet { centerContainer.snp.updateConstraints { $0.left.equalTo(contentOffset) } }
+    }
+
+    /// Value for content offset in default state
+    public let closedOffset = CGFloat(0)
+
+    /// Value for content offset when right view is fully revealed
+    public var rightRevealedOffset: CGFloat {
+        return -rightContainer.frame.width
+    }
+
     private func setupLayout() {
         centerContainer.snp.makeConstraints {
             $0.top.equalToSuperview()
             $0.bottom.equalToSuperview()
             $0.size.equalToSuperview()
-            $0.left.equalTo(horizontalOffset)
+            $0.left.equalTo(contentOffset)
         }
         rightContainer.snp.makeConstraints {
             $0.top.equalTo(centerContainer.snp.top)
             $0.left.equalTo(centerContainer.snp.right)
             $0.bottom.equalTo(centerContainer.snp.bottom)
         }
-    }
-
-    private var horizontalOffset = CGFloat(0) {
-        didSet { centerContainer.snp.updateConstraints { $0.left.equalTo(horizontalOffset) } }
     }
 
     private func layoutIfNeeded(animated: Bool) {

    }

    private func handlePanBegan(point: CGFloat) {
        pan = Pan(point: point, offset: horizontalOffset)
    }

    private func handlePanChanged(point: CGFloat) {
        pan?.currentPoint = point
        guard let pan = pan else { return }
        let targetOffset = pan.startOffset + pan.delta
        horizontalOffset = max(rightRevealedOffset, min(closedOffset, targetOffset))
    }

    private func handlePanEnded() {
        guard let pan = pan else { return }

        if pan.lastDelta > 0 {
            horizontalOffset = closedOffset
        } else {
            horizontalOffset = rightRevealedOffset
        }

        layoutIfNeeded(animated: true)
        self.pan = nil
    }

    private let closedOffset = CGFloat(0)

    private var rightRevealedOffset: CGFloat {
        return -rightContainer.frame.width
    }

}

/// Swipe-to-reveal view
public class SwipeToRevealView: UIView {

    /// Create SwipeToRevealView
    ///
    /// - Parameter frame: frame
    override public init(frame: CGRect) {
        super.init(frame: frame)
        loadSubviews()
