         scrollView.addSubview(joinedtableView)
         scrollView.addSubview(createdtableView)
         
-        let indicator = UIView(frame: CGRect(x: 0, y: 0, width: swidth / 2, height: 2))
+        
         indicator.backgroundColor = UIColor.green
+        indicatorView.contentSize = CGSize(width: swidth , height: 2)
         indicatorView.addSubview(indicator)
         view.addSubview(indicatorView)
        

    func scrollViewDidScroll(_ scrollView: UIScrollView) {
        
        let offsetX = scrollView.contentOffset.x
        if offsetX > 0 {
            indicatorView?.setContentOffset(CGPoint(x: -offsetX/2, y: indicatorView?.contentOffset.y ?? 44), animated: true)


        setupNavBar()
        setupUI()
        

    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    // 勉强解决
    override func viewWillAppear(_ animated: Bool) {


        if !isFirstPageSelected {
            indicatorView?.setContentOffset(CGPoint(x: -swidth/2, y: 0), animated: false)
        }
    }
    
    // 加载我参加的活动数据
