         
         YHTabBarViewConfigLeftView()
         YHTabBarViewConfigRightView()
+        YHTabBarViewScrollView()
         YHTabBarViewCollectionView()
-        
+        YHTabBarBottomLineView()
     }
     //加载leftView
     fileprivate func YHTabBarViewConfigLeftView(){

        collectionview?.register(YHTabBarViewItem.self, forCellWithReuseIdentifier: "YHTabBarItem")

    }
    
    
    
}

// MARK: UICollectionView delegate datasource layoutDelegate

                collectionView.setContentOffset(CGPoint(x: collectionView.contentSize.width - collectionView.frame.size.width , y: 0), animated: true)
            }
            
            //下标点击移动
            
            UIView.animate(withDuration: 0.2, animations:{
                if let bottomLineView = self.bottomLineView {
                    
                    if offset < collectionView.frame.size.width / 2 {
                        bottomLineView.frame = CGRect(x: rectCell.origin.x, y: self.frame.size.height - self.lineBottomHeight, width: rectCell.size.width, height:self.lineBottomHeight)
                    }else if  offset + collectionView.frame.size.width / 2 < collectionView.contentSize.width {
                        
                        bottomLineView.frame = CGRect(x: rectCell.origin.x - collectionView.frame.size.width / 2, y: self.frame.size.height - self.lineBottomHeight, width: rectCell.size.width, height:self.lineBottomHeight)
                    }else{
                        bottomLineView.frame = CGRect(x: rectCell.origin.x, y: self.frame.size.height - self.lineBottomHeight, width: rectCell.size.width, height:self.lineBottomHeight)
                    }

                    
                }
            }, completion: {Void in
            })
            
        }
        selectIndex = indexPath.row
