      
      - returns: Tab个数
      */
-    func numberOfTab(view: RGSwitchView) -> Int
+    func numberOfTab(_ view: RGSwitchView) -> Int
     
     /**
      每个Tab所对应的ViewController

//  MARK: - Scroll View Delegate
extension RGSwitchView: UIScrollViewDelegate {
    //  scrollView开始滑动
    func scrollViewWillBeginDragging(scrollView: UIScrollView) {
        if scrollView == rootScrollView {
            userContentOffsetX = scrollView.contentOffset.x
        }
    }
    
    //  scrollView结束滑动
    func scrollViewDidScroll(scrollView: UIScrollView) {
        if scrollView == rootScrollView {
            //  判断用户是左滑动还是右滑动
            isLeftScroll = userContentOffsetX < scrollView.contentOffset.x ? true : false

    
    //  MARK: Top scrollView logic methods
    //  选中Tab事件
    @objc fileprivate func selectNameButton(_ sender: UIButton) {
        //  如果点击的Tab文字显示不全，调整滚动视图x坐标使用使Tab文字显示全
        adjustScrollViewContentX(sender)
        
