     
     open override func layoutSubviews() {
         let subviewFrames = subviewFramesThatFit(bounds.size)
+        heightConstraint.constant = subviewFrames.last?.maxY ?? 0.0
+        heightConstraint.isActive = true
+        super.layoutSubviews()
         zip(subviews, subviewFrames).forEach { $0.frame = $1 }
-        heightConstraint?.constant = subviewFrames.last?.maxY ?? 0.0
-        super.layoutSubviews()
     }
     
 }

    @IBInspectable var gapWidth: CGFloat = 0.0
    @IBInspectable var gapHeight: CGFloat = 0.0
    
    private var heightConstraint: NSLayoutConstraint?
    
    // MARK: - Functions
    
    func addHeightConstraint() {
        heightConstraint = NSLayoutConstraint(item: self,
                                              attribute: .height,
                                              relatedBy: .equal,
                                              toItem: nil,
                                              attribute: .height,
                                              multiplier: 1.0,
                                              constant: 100.0)
        addConstraint(heightConstraint!)
    }
    
    private func subviewFramesThatFit(_ size: CGSize) -> [CGRect] {
        var subviewFrames: [CGRect] = []

        return subviewFrames
    }
    
    // MARK: - UIView
    
    open override var intrinsicContentSize: CGSize {
