         return .bottom
     }
 
-    override var size: CGSize {
-        return CGSize(width: coreViewFrame.width, height: min(maxHeight, height))
-    }
-
-    private var minYToShow: CGFloat {
-        return coreViewFrame.height * 0.75
-    }
-
-    private var hiddenHeight: CGFloat {
-        return coreViewFrame.height - placeholder
-    }
+    private var topDistanceFromBottom: NSLayoutConstraint!
 
     required public init(context: UIObject) {
         super.init(context: context)
 
+        addGestures()
+        initConstraint()
+    }
+
+    private func addGestures() {
         addGesture(UITapGestureRecognizer(target: self, action: #selector(didTapView)), cancelingTouchesInView: false)
         addGesture(UIPanGestureRecognizer(target: self, action: #selector(onDragView)))
+    }
+
+    private func initConstraint() {
+        guard let superview = view.superview else { return }
+
+        topDistanceFromBottom = view.topAnchor.constraint(equalTo: superview.bottomAnchor, constant: 0)
     }
 
     override open func render() {
         super.render()
 
         adjustSize()
-        moveDown(with: .zero)
-        adjustInitialPosition()
+        adjustPosition()
     }
 
     private func adjustSize() {
-        view.frame.size = size
+        view.translatesAutoresizingMaskIntoConstraints = false
+
+        addWidthConstraint()
+        addHeightConstraint()
     }
 
-    private func adjustInitialPosition() {
-        initialCenterY = view.center.y
+    private func addWidthConstraint() {
+        guard let superview = view.superview else { return }
+
+        let widthConstraint = view.widthAnchor.constraint(equalTo: superview.widthAnchor, constant: 0)
+        widthConstraint.isActive = true
+        superview.addConstraint(widthConstraint)
+    }
+
+    private func addHeightConstraint() {
+        guard let superview = view.superview else { return }
+
+        if height < maxHeight {
+            let heightConstraint = view.heightAnchor.constraint(equalToConstant: height)
+            heightConstraint.isActive = true
+            view.addConstraint(heightConstraint)
+        } else {
+            let heightConstraint = view.heightAnchor.constraint(equalTo: superview.heightAnchor, multiplier: 0.5)
+            heightConstraint.isActive = true
+            superview.addConstraint(heightConstraint)
+        }
+    }
+
+    private func adjustPosition() {
+        guard let superview = view.superview else { return }
+
+        topDistanceFromBottom = view.topAnchor.constraint(equalTo: superview.bottomAnchor, constant: placeholder * -1)
+        topDistanceFromBottom.isActive = true
+
+        superview.addConstraint(topDistanceFromBottom)
     }
 
     override open func onDrawerShow() {

    private func handleGestureChange(with gesture: UIPanGestureRecognizer) {
        guard let view = gesture.view else { return }

        if canDrag(with: gesture.newYCoordinate) {
            let portionShown = initialCenterY - gesture.newYCoordinate
            let mediaControlAlpha = hiddenHeight / portionShown * 0.08

            view.center.y = gesture.newYCoordinate
            view.alpha = 1

            core?.trigger(InternalEvent.didDragDrawer.rawValue, userInfo: ["alpha": mediaControlAlpha])
        }
    }

    private var maxHeight: CGFloat {
        return overlayViewFrame.height/2
    }

    private var minHeightToShow: CGFloat {
        return overlayViewFrame.height * 0.25
    }

    open var height: CGFloat {
