             return
         }
         
+        if button.tag == 2 {
+            UIView.animate(withDuration: 0.25) {
+                self.topScrollView.contentOffset = CGPoint(x: 0, y: 0)
+            }
+        }
         
+        if button.tag == 5 {
+            UIView.animate(withDuration: 0.25) {
+                self.topScrollView.contentOffset = CGPoint(x: ScreenWidth / 5, y: 0)
+            }
+        }
         
         selectedButton.isSelected = false
         button.isSelected = true


class DTDanTangController: BaseController, UIScrollViewDelegate {
    
    var topScrollView = UIScrollView()
    var topView = UIView() // 顶部背景
    let line = UIView() // 小横线
    let contentView = UIScrollView() // 下面的内容区域
    var selectedButton: UIButton! // 顶部背景上的按钮

        
        self.scrollViewDidEndScrollingAnimation(scrollView)
        let index = scrollView.contentOffset.x / self.view.frame.size.width;
        changeVC(button: topScrollView.subviews[Int(index)+1] as! UIButton)
    }
    
}
