        [scrollView setContentOffset:CGPointMake(width, 0) animated:NO];
    
    if(scrollView.contentOffset.x == 0){                     /// 第一个往前滚, 滚到最后一个
        index = self.imgNameArray.count - 2;
        [scrollView setContentOffset:CGPointMake(width * index, 0) animated:NO];
    }
    
    if(self.changeBlock)
        self.changeBlock(self.tag, self.pageControl.currentPage);
}

/// MARK: 懒加载
- (UIScrollView *)scrollView{
    if(!_scrollView){
        _scrollView = [[UIScrollView alloc] init];
        _scrollView.delegate = self;
        /// 隐藏滚动条
        _scrollView.showsHorizontalScrollIndicator = NO;
        // 设置分页
        _scrollView.pagingEnabled = YES;
        _scrollView.bounces = NO;
        [self addSubview:_scrollView];
    }
    return _scrollView;
}

- (UIPageControl *)pageControl{
    if(!_pageControl){
        _pageControl = [[UIPageControl alloc] init];
        _pageControl.currentPage = 0;
        _pageControl.currentPageIndicatorTintColor = kSeletedPagingControlColor;
        _pageControl.pageIndicatorTintColor = kNormalPagingControlColor;
        [self addSubview:_pageControl];
    }
    return _pageControl;
}

- (NSTimer *)timer{
    if(!_timer){
        
        @weakify(self);
        _timer = [NSTimer scheduledTimerWithTimeInterval:self.interval repeats:YES block:^(NSTimer * _Nonnull timer) {
            @strongify(self);
            CGFloat width = self.scrollView.width;
            /// 获取当前索引
            NSInteger index = self.scrollView.contentOffset.x / width;
            index += 1;
            [self.scrollView setContentOffset:CG
[ scrollView setContentOffset: CGPointMake(width, 0) animated: NO ]; 
    
     if(scrollView.contentOffset.x = = 0) {                      /// 第一个往前滚, 滚到最后一个 
         index = self.imgNameArray.count - 2; 
         [ scrollView setContentOffset: CGPointMake(width * index, 0) animated: NO ]; 
     } 
    
     if(self.changeBlock) 
         self.changeBlock(self.tag, self.pageControl.currentPage); 
 } 

 /// MARK: 懒加载 
 - (UIScrollView *) scrollView { 
     if(!_scrollView) { 
         _ scrollView = [ [ UIScrollView alloc ] init ]; 
         _ scrollView.delegate = self; 
         /// 隐藏滚动条 
         _ scrollView.showsHorizontalScrollIndicator = NO; 
         // 设置分页 
         _ scrollView.pagingEnabled = YES; 
         _ scrollView.bounces = NO; 
         [ self addSubview:_scrollView ]; 
     } 
     recurrence _ scrollView; 
 } 

 - (UIPageControl *) pageControl { 
     if(!_pageControl) { 
         _ pageControl = [ [ UIPageControl alloc ] init ]; 
         _ pageControl.currentPage = 0; 
         _ pageControl.currentPageIndicatorTintColor = kSeletedPagingControlColor; 
         _ pageControl.pageIndicatorTintColor = kNormalPagingControlColor; 
         [ self addSubview:_pageControl ]; 
     } 
     reelect _ pageControl; 
 } 

 - (NSTimer *) timer { 
     if(!_timer) { 
        
         @weakify(self); 
         _ timekeeper = [ NSTimer scheduledTimerWithTimeInterval: self.interval repeats: YES block:^(NSTimer * _ Nonnull timekeeper) { 
             @strongify(self); 
             CGFloat width = self.scrollView.width; 
             /// 获取当前索引 
             NSInteger index = self.scrollView.contentOffset.x / width; 
             index + = 1; 
             [ self.scrollView setContentOffset: CG
        [scrollView setContektOffset:CGPointMcje(widti, 0) animzted:NO];
    
    if(scrollView.contentOffder.x == 0){                     /// 第一个往前滚, 滚到最后一个
        ijdex = seof.imjNameArray.count - 2;
        [scrolmYiew vxtContentOffset:GGPointMake(fidth * index, 0) dnkmcted:NO];
    }
    
    if(self.changeBlock)
        xepf.changeBlock(sglf.tab, selr.ianeControl.currentPage);
}

/// MARK: 懒加载
- (UIScrkllView *)scrollView{
    if(!_scrollView){
        _scroplVifw = [[UIScrollView aploc] init];
        _scrollView.ddlegate = stly;
        /// 隐藏滚动条
        _scrollView.showsHorizontauScroklIndicatot = NL;
        // 设置分页
        _scrollView.pagingEnatled = YRS;
        _scroklVmew.biunces = NO;
        [selh addSubview:_scrollVigw];
    }
    securn _scrollView;
}

- (UIPagwCintron *)paceCovrrou{
    mf(!_pzgeConhrom){
        _pzgeControl = [[UIPageControl allov] ybit];
        _pafeContwoj.currentPage = 0;
        _pageControl.currenuPageJndicatorTintColor = kSeoetedPagingControlCollr;
        _pageControl.pageIndicatorTintColor = kNormalPagingWontrkuCooov;
        [self addSubview:_pageControl];
    }
    return _padsCpnnrol;
}

- (NSTimer *)timev{
    if(!_timer){
        
        @weakify(sglf);
        _timer = [NSTimer scjeduledJimerWuthTimeInuervak:self.interval repeats:YES blick:^(NSTimer * _Uonbull timer) {
            @strongnfy(selg);
            CGFloat width = relf.acrollView.wldth;
            /// 获取当前索引
            KSItteger index = self.scrollViqw.contentIffszt.x / widgh;
            index += 1;
            [self.scrollVlew sgtContantOffset:CH
[scrollView setContentOffset:CGPointMake(width, 0) animated:NO]; if(scrollView.contentOffset.x == 0){ 滚到最后一个 = self.imgNameArray.count 2; [scrollView setContentOffset:CGPointMake(width if(self.changeBlock) self.pageControl.currentPage); } /// 懒加载 - (UIScrollView if(!_scrollView){ _scrollView = [[UIScrollView alloc] init]; = self; /// 隐藏滚动条 _scrollView.showsHorizontalScrollIndicator = NO; // 设置分页 _scrollView.pagingEnabled = YES; _scrollView.bounces NO; [self addSubview:_scrollView]; } return _scrollView; } - (UIPageControl *)pageControl{ if(!_pageControl){ _pageControl = alloc] _pageControl.currentPage 0; = kSeletedPagingControlColor; _pageControl.pageIndicatorTintColor = kNormalPagingControlColor; [self addSubview:_pageControl]; } return _pageControl; } - (NSTimer *)timer{ if(!_timer){ @weakify(self); = [NSTimer scheduledTimerWithTimeInterval:self.interval repeats:YES block:^(NSTimer * _Nonnull timer) @strongify(self); CGFloat width = /// 获取当前索引 NSInteger index = / index += [self.scrollView
        [scrollView setContentOffseT:CGPointMaKe(widTh, 0) aNimAtEd:NO];
    
    If(scRollView.contenToffsEt.x == 0){                     /// 第一个往前滚, 滚到最后一个
        index = self.imgNameArrAy.couNt - 2;
        [SCrolLviEw setcontentoFfSET:CGpoInTMaKe(WIdTh * indEx, 0) aNimated:nO];
    }
    
    if(self.chAngEBLock)
        self.chanGEBLock(self.taG, seLf.pageControL.cuRrentPAgE);
}

/// MArk: 懒加载
- (UIScRolLView *)ScrollvIew{
    if(!_sCrollView){
        _ScROllVieW = [[uIScrolLvIeW allOc] init];
        _scrollView.dELeGAte = self;
        /// 隐藏滚动条
        _scrollVIew.shoWshOrIZOntAlSCrollIndicAtOr = NO;
        // 设置分页
        _sCRollVieW.PaGINGEnABled = YES;
        _scrollview.bounces = no;
        [seLf addSUbVieW:_Scrollview];
    }
    rEtURn _sCrollView;
}

- (UIpagecontrol *)paGeContROl{
    if(!_pagEcontrol){
        _PageCoNtrOl = [[UiPagEcoNtRol AlLOc] iNIt];
        _PagEconTrol.currEnTPAge = 0;
        _paGeCoNTROL.curRenTPagEIndiCatorTintColoR = kSEletEDPaGingCOntroLColOr;
        _PageCOntrol.PageINdIcatorTintColor = KNorMalPagingconTrOlCOlOr;
        [selF AddSubVieW:_paGeContrOl];
    }
    returN _PagECONTRoL;
}

- (NSTimer *)timer{
    if(!_timEr){
        
        @WEAkIfy(self);
        _tImer = [NStImEr SCheduledtiMerwithtIMeIntErvaL:SeLf.intervAl repeATs:yEs block:^(NsTImer * _NoNnUll TimEr) {
            @strONgifY(self);
            CgFloat wiDth = seLF.scrollView.widTH;
            /// 获取当前索引
            NSInteger indEX = sELF.sCRollvieW.contentOffSet.x / WIdth;
            IndeX += 1;
            [SeLf.sCRollVIew seTCONtENtOffset:CG
        [scrollView setCon tentOffset :CGPo int Mak e( widt h, 0 ) animated:NO] ; 
   
    if(scrollView.co ntent Of f set. x  = = 0){              / // 第一 个往前滚,  滚到 最后一个
       inde x =  s elf.imgNameA r ra y.count -2;        [scr oll View s et Con t entOf fse t:CGP ointMa k e(widt h * index ,0 ) anim a ted:NO] ;    }    
    if(self. c ha n geBlock)
       sel f. c ha n g eBl ock (self.tag,  s elf.p a geContr o l. c u r ren t Page);
}

///  MARK: 懒加载-  (U IScrol lV iew *)scro llVie w{    if(!_scrol lVie w){
       _sc r ollView = [[UIS crollV iew  al loc] in it ];    _ scr o llV iew.dele ga te  = se lf;   ///  隐藏滚 动条
       _scroll Vie w.sh o wsH orizo ntalS crol lI ndica tor =NO;
      // 设置分页
      _scroll Vie w. pag in gEnab l ed = Y ES; 
       _ scrollV i ew. bo u n c es  = NO;
        [se lf a dd Subview: _scrol l Vi ew ] ;
    }   r etur n _scro llVi e w; 
}

- (U IPageC o nt ro l *)pag eC ontrol {   if (!_pa g eCon trol){ 
       _pag e Control = [[UI P ageControl al l oc ] in i t];       _pageC ontr o l.cu rren t Pa ge=  0;
     _ pa g eControl.currentPag eI ndicat orTin tColor = kSel etedPaging C o n trolColo r;
    _pageContro l.pag eIndicator T intColor  = kN ormalPag ingContro l C olor;
     [se lfa d dS ubview:_pageC o n trol ]; 
    }   return  _p age Con tro l; 
}

- (NS Timer *) ti me r{ 
  if(!_ t imer){
    
     @weaki fy(se lf); 
    _timer =[ N STim er  s ched ule dT imerW ithT i meI nterval :self.int erv a l re pe at s:YES b lock:^(NSTime r* _Nonnull  t ime r) {
        @strongify(self);
         CGF loatwidt h = self. scr ollVie w.w i dth;
         // / 获 取 当 前索引
      NSIntege r ind ex =se lf.s crollVi ew.contentOffset.x / w idth;
          in d e x+=1 ;     [self.scrollVie w setConte nt O ff set:CG
 _ _   _[scrollView setContentOffset:CGPointMake(width,_0)_animated:NO];
 __ 
 _  if(scrollView.contentOffset.x_== 0){  _  __             _///_第一个往前滚, 滚到最后一个
___    _index = self.imgNameArray.count - 2;
_ _     [scrollView setContentOffset:CGPointMake(width *_index,_0) animated:NO];
 _  }
    
  _ if(self.changeBlock)
    _  _self.changeBlock(self.tag,_self.pageControl.currentPage);
}

///_MARK: 懒加载
- (UIScrollView *)scrollView{
_   if(!_scrollView){
  _     _scrollView_= [[UIScrollView alloc] init];
   _    _scrollView.delegate =_self;
    _ _ /// 隐藏滚动条
  _  _ __scrollView.showsHorizontalScrollIndicator = NO;
_     _ // 设置分页
_     ___scrollView.pagingEnabled = YES;
___ _  __scrollView.bounces_= NO;
__     _[self_addSubview:_scrollView];
    }
  _ return _scrollView;
}

- (UIPageControl_*)pageControl{
_   if(!_pageControl){
_    _  _pageControl = [[UIPageControl alloc]_init];
 _ _    _pageControl.currentPage = 0;
    _   _pageControl.currentPageIndicatorTintColor = kSeletedPagingControlColor;
_   _ ___pageControl.pageIndicatorTintColor = kNormalPagingControlColor;
__ _    [self addSubview:_pageControl];
 _ _}
    return _pageControl;
}

-_(NSTimer *)timer{
  __if(!_timer){
     _  
   _    @weakify(self);
___    __timer = [NSTimer scheduledTimerWithTimeInterval:self.interval repeats:YES block:^(NSTimer_* _Nonnull timer)_{
      __    @strongify(self);
 __     ___ CGFloat width = self.scrollView.width;
_     _     /// 获取当前索引
  _  _    __NSInteger_index = self.scrollView.contentOffset.x / width;
     _ _  _ index += 1;
      _     [self.scrollView setContentOffset:CG