             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! // 顶部背景上的按钮

    
    private func setTopView() {
        
        let count = self.childViewControllers.count
        let buttonW = ScreenWidth / 5
        
        
        topScrollView = UIScrollView(frame: CGRect(x: 0, y: NavHeight, width: ScreenWidth, height: HomeTitlesViewHeight))
        topScrollView.contentSize = CGSize(width: ScreenWidth / 5 * count , height: 0)
        topScrollView.showsHorizontalScrollIndicator = false
        view.addSubview(topScrollView)
        
        
        line.backgroundColor = GlobalColor
        line.frame.size.height = 2
