     }
     
     //MARK: UIScrollViewDelegate
-    internal func scrollViewWillEndDragging(scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
+    public func scrollViewWillEndDragging(scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
         let fractionalPage = targetContentOffset.memory.x / scrollView.frame.size.width;
         let page = ceil(fractionalPage)
         

    let btScrollView = BTHorizontalPageableView(frame: frame)

*/
class BTHorizontalPageableView: UIView, YSSegmentedControlDelegate, UIScrollViewDelegate {

    //// The Segmented control, used for display the 'titles' bar.
    var segmentedControl : YSSegmentedControl? {

        self.init(frame: CGRect.zero)
    }

    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        self.addSubview(self.scrollView)
    }
