     override public func addSubview(_ view: UIView) {
         view.translatesAutoresizingMaskIntoConstraints = false
         let lastView = self.subviews.last
+        
+        if direction == .vertical {
+            view.frame = CGRect(x: 0, y: lastView?.frame.maxY ?? 0, width: 0, height: 0)
+        } else {
+            view.frame = CGRect(x: lastView?.frame.maxX ?? 0, y: 0, width: 0, height: 0)
+        }
+        
         super.addSubview(view)
         
         let insets = delegate?.stackedView(self, spacingForView: view) ?? UIEdgeInsets.zero

    }
    
    public override func insertSubview(_ view: UIView, at index: Int) {
        if index == subviews.count {
            addSubview(view)
        }
        view.translatesAutoresizingMaskIntoConstraints = false
        super.insertSubview(view, at: index)
        
        let insets = delegate?.stackedView(self, spacingForView: view) ?? UIEdgeInsets.zero
        
        guard index > 0 else {
            let vConstraints = NSLayoutConstraint.constraints(
                withVisualFormat: "\(vAxis):|-top-[addedView]",
                options: NSLayoutFormatOptions(rawValue: 0),

                multiplier: 1.0,
                constant: constant
            )
            constraint.identifier = "Bottom constraint of stack"
            self.bottomConstraint = constraint
        }
        
