                 abort()
             }
         }
+        didSet { updateScrollViewFrame() }
     }
     public weak var delegate : HorizontalPickerDelegate? {
         didSet { setup() }

        // This hittest allows the user to start scrolling from outside the scrollview's bounds.
        // ie the views next to the current page, which are outside but visible thanks to clipsToBounds.
        return pointInside(point, withEvent: event) ? scrollView : nil
    }

    // MARK: - UIScrollViewDelegate


        pageWidth = size.width

        updateScrollViewFrame()
        scrollView.delegate = self
        scrollView.contentSize = CGSize(width: CGFloat(count + 1) * size.width, height: size.height)
        print("size", visiblePages, scrollView.frame, scrollView.contentSize)

