 
 private extension OLScrollingNavBar {
     func updateItems() {
+        subviews.forEach({$0.removeFromSuperview()})
+        buttons.removeAll()
+
         var xPos: CGFloat = 0
 
         for (_, item) in barItems.enumerated() {

    override var frame: CGRect {
        didSet {
            guard let size = superview?.frame.size else { return }
            super.frame = CGRect(x: 0, y: 0, width: size.width, height: size.height)
        }
    }


            buttons.append(button)
        }

        xPos = max((superview?.frame.size.width ?? 0)+1, xPos)
        contentSize = CGSize(width: xPos, height: 44)
    }

