123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753 |
- //
- // SDCycleScrollView.m
- // SDCycleScrollView
- //
- // Created by aier on 15-3-22.
- // Copyright (c) 2015年 GSD. All rights reserved.
- //
- /*
-
- *********************************************************************************
- *
- * 🌟🌟🌟 新建SDCycleScrollView交流QQ群:185534916 🌟🌟🌟
- *
- * 在您使用此自动轮播库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并
- * 帮您解决问题。
- * 新浪微博:GSD_iOS
- * Email : gsdios@126.com
- * GitHub: https://github.com/gsdios
- *
- * 另(我的自动布局库SDAutoLayout):
- * 一行代码搞定自动布局!支持Cell和Tableview高度自适应,Label和ScrollView内容自适应,致力于
- * 做最简单易用的AutoLayout库。
- * 视频教程:http://www.letv.com/ptv/vplay/24038772.html
- * 用法示例:https://github.com/gsdios/SDAutoLayout/blob/master/README.md
- * GitHub:https://github.com/gsdios/SDAutoLayout
- *********************************************************************************
-
- */
- #import "SDCycleScrollView.h"
- #import "SDCollectionViewCell.h"
- #import "UIView+SDExtension.h"
- #import "TAPageControl.h"
- #import "UIImageView+WebCache.h"
- #import "SDImageCache.h"
- #import "SDWebImageManager.h"
- #define kCycleScrollViewInitialPageControlDotSize CGSizeMake(10, 10)
- NSString * const ID = @"cycleCell";
- @interface SDCycleScrollView () <UICollectionViewDataSource, UICollectionViewDelegate>
- @property (nonatomic, weak) UICollectionView *mainView; // 显示图片的collectionView
- @property (nonatomic, weak) UICollectionViewFlowLayout *flowLayout;
- @property (nonatomic, strong) NSArray *imagePathsGroup;
- @property (nonatomic, weak) NSTimer *timer;
- @property (nonatomic, assign) NSInteger totalItemsCount;
- @property (nonatomic, weak) UIControl *pageControl;
- @property (nonatomic, strong) UIImageView *backgroundImageView; // 当imageURLs为空时的背景图
- @end
- @implementation SDCycleScrollView
- - (instancetype)initWithFrame:(CGRect)frame
- {
- if (self = [super initWithFrame:frame]) {
- [self initialization];
- [self setupMainView];
- }
- return self;
- }
- - (void)awakeFromNib
- {
- [super awakeFromNib];
- [self initialization];
- [self setupMainView];
- }
- - (void)initialization
- {
- _pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
- _autoScrollTimeInterval = 7.0;
- _titleLabelTextColor = [UIColor whiteColor];
- _titleLabelTextFont= [UIFont systemFontOfSize:14];
- _titleLabelBackgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
- _titleLabelHeight = 30;
- _autoScroll = YES;
- _infiniteLoop = YES;
- _showPageControl = YES;
- _pageControlDotSize = kCycleScrollViewInitialPageControlDotSize;
- _pageControlBottomOffset = 0;
- _pageControlRightOffset = 0;
- _pageControlStyle = SDCycleScrollViewPageContolStyleClassic;
- _hidesForSinglePage = YES;
- _currentPageDotColor = [UIColor whiteColor];
- _pageDotColor = [UIColor lightGrayColor];
- _bannerImageViewContentMode = UIViewContentModeScaleToFill;
-
- self.backgroundColor = [UIColor lightGrayColor];
-
- }
- + (instancetype)cycleScrollViewWithFrame:(CGRect)frame imageNamesGroup:(NSArray *)imageNamesGroup
- {
- SDCycleScrollView *cycleScrollView = [[self alloc] initWithFrame:frame];
- cycleScrollView.localizationImageNamesGroup = [NSMutableArray arrayWithArray:imageNamesGroup];
- return cycleScrollView;
- }
- + (instancetype)cycleScrollViewWithFrame:(CGRect)frame shouldInfiniteLoop:(BOOL)infiniteLoop imageNamesGroup:(NSArray *)imageNamesGroup
- {
- SDCycleScrollView *cycleScrollView = [[self alloc] initWithFrame:frame];
- cycleScrollView.infiniteLoop = infiniteLoop;
- cycleScrollView.localizationImageNamesGroup = [NSMutableArray arrayWithArray:imageNamesGroup];
- return cycleScrollView;
- }
- + (instancetype)cycleScrollViewWithFrame:(CGRect)frame imageURLStringsGroup:(NSArray *)imageURLsGroup
- {
- SDCycleScrollView *cycleScrollView = [[self alloc] initWithFrame:frame];
- cycleScrollView.imageURLStringsGroup = [NSMutableArray arrayWithArray:imageURLsGroup];
- return cycleScrollView;
- }
- + (instancetype)cycleScrollViewWithFrame:(CGRect)frame delegate:(id<SDCycleScrollViewDelegate>)delegate placeholderImage:(UIImage *)placeholderImage
- {
- SDCycleScrollView *cycleScrollView = [[self alloc] initWithFrame:frame];
- cycleScrollView.delegate = delegate;
- cycleScrollView.placeholderImage = placeholderImage;
-
- return cycleScrollView;
- }
- // 设置显示图片的collectionView
- - (void)setupMainView
- {
- UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
- flowLayout.minimumLineSpacing = 0;
- flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
- _flowLayout = flowLayout;
-
- UICollectionView *mainView = [[UICollectionView alloc] initWithFrame:self.bounds collectionViewLayout:flowLayout];
- mainView.backgroundColor = [UIColor clearColor];
- mainView.pagingEnabled = YES;
- mainView.showsHorizontalScrollIndicator = NO;
- mainView.showsVerticalScrollIndicator = NO;
- [mainView registerClass:[SDCollectionViewCell class] forCellWithReuseIdentifier:ID];
- mainView.dataSource = self;
- mainView.delegate = self;
- mainView.scrollsToTop = NO;
- [self addSubview:mainView];
- _mainView = mainView;
- }
- #pragma mark - properties
- - (void)setPlaceholderImage:(UIImage *)placeholderImage
- {
- _placeholderImage = placeholderImage;
-
- if (!self.backgroundImageView) {
- UIImageView *bgImageView = [UIImageView new];
- bgImageView.contentMode = UIViewContentModeScaleAspectFit;
- [self insertSubview:bgImageView belowSubview:self.mainView];
- self.backgroundImageView = bgImageView;
- }
-
- self.backgroundImageView.image = placeholderImage;
- }
- - (void)setPageControlDotSize:(CGSize)pageControlDotSize
- {
- _pageControlDotSize = pageControlDotSize;
- [self setupPageControl];
- if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
- TAPageControl *pageContol = (TAPageControl *)_pageControl;
- pageContol.dotSize = pageControlDotSize;
- }
- }
- - (void)setShowPageControl:(BOOL)showPageControl
- {
- _showPageControl = showPageControl;
-
- _pageControl.hidden = !showPageControl;
- }
- - (void)setCurrentPageDotColor:(UIColor *)currentPageDotColor
- {
- _currentPageDotColor = currentPageDotColor;
- if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
- TAPageControl *pageControl = (TAPageControl *)_pageControl;
- pageControl.dotColor = currentPageDotColor;
- } else {
- UIPageControl *pageControl = (UIPageControl *)_pageControl;
- pageControl.currentPageIndicatorTintColor = currentPageDotColor;
- }
-
- }
- - (void)setPageDotColor:(UIColor *)pageDotColor
- {
- _pageDotColor = pageDotColor;
-
- if ([self.pageControl isKindOfClass:[UIPageControl class]]) {
- UIPageControl *pageControl = (UIPageControl *)_pageControl;
- pageControl.pageIndicatorTintColor = pageDotColor;
- }
- }
- - (void)setCurrentPageDotImage:(UIImage *)currentPageDotImage
- {
- _currentPageDotImage = currentPageDotImage;
-
- if (self.pageControlStyle != SDCycleScrollViewPageContolStyleAnimated) {
- self.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;
- }
-
- [self setCustomPageControlDotImage:currentPageDotImage isCurrentPageDot:YES];
- }
- - (void)setPageDotImage:(UIImage *)pageDotImage
- {
- _pageDotImage = pageDotImage;
-
- if (self.pageControlStyle != SDCycleScrollViewPageContolStyleAnimated) {
- self.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;
- }
-
- [self setCustomPageControlDotImage:pageDotImage isCurrentPageDot:NO];
- }
- - (void)setCustomPageControlDotImage:(UIImage *)image isCurrentPageDot:(BOOL)isCurrentPageDot
- {
- if (!image || !self.pageControl) return;
-
- if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
- TAPageControl *pageControl = (TAPageControl *)_pageControl;
- if (isCurrentPageDot) {
- pageControl.currentDotImage = image;
- } else {
- pageControl.dotImage = image;
- }
- }
- }
- - (void)setInfiniteLoop:(BOOL)infiniteLoop
- {
- _infiniteLoop = infiniteLoop;
-
- if (self.imagePathsGroup.count) {
- self.imagePathsGroup = self.imagePathsGroup;
- }
- }
- -(void)setAutoScroll:(BOOL)autoScroll{
- _autoScroll = autoScroll;
-
- [self invalidateTimer];
-
- if (_autoScroll) {
- [self setupTimer];
- }
- }
- - (void)setScrollDirection:(UICollectionViewScrollDirection)scrollDirection
- {
- _scrollDirection = scrollDirection;
-
- _flowLayout.scrollDirection = scrollDirection;
- }
- - (void)setAutoScrollTimeInterval:(CGFloat)autoScrollTimeInterval
- {
- _autoScrollTimeInterval = autoScrollTimeInterval;
-
- [self setAutoScroll:self.autoScroll];
- }
- - (void)setPageControlStyle:(SDCycleScrollViewPageContolStyle)pageControlStyle
- {
- _pageControlStyle = pageControlStyle;
-
- [self setupPageControl];
- }
- - (void)setImagePathsGroup:(NSArray *)imagePathsGroup
- {
- [self invalidateTimer];
-
- _imagePathsGroup = imagePathsGroup;
-
- _totalItemsCount = self.infiniteLoop ? self.imagePathsGroup.count * 100 : self.imagePathsGroup.count;
-
- if (imagePathsGroup.count != 1) {
- self.mainView.scrollEnabled = YES;
- [self setAutoScroll:self.autoScroll];
- } else {
- self.mainView.scrollEnabled = NO;
- }
-
- [self setupPageControl];
- [self.mainView reloadData];
- }
- - (void)setImageURLStringsGroup:(NSArray *)imageURLStringsGroup
- {
- _imageURLStringsGroup = imageURLStringsGroup;
-
- NSMutableArray *temp = [NSMutableArray new];
- [_imageURLStringsGroup enumerateObjectsUsingBlock:^(NSString * obj, NSUInteger idx, BOOL * stop) {
- NSString *urlString;
- if ([obj isKindOfClass:[NSString class]]) {
- urlString = obj;
- } else if ([obj isKindOfClass:[NSURL class]]) {
- NSURL *url = (NSURL *)obj;
- urlString = [url absoluteString];
- }
- if (urlString) {
- [temp addObject:urlString];
- }
- }];
- self.imagePathsGroup = [temp copy];
- }
- - (void)setLocalizationImageNamesGroup:(NSArray *)localizationImageNamesGroup
- {
- _localizationImageNamesGroup = localizationImageNamesGroup;
- self.imagePathsGroup = [localizationImageNamesGroup copy];
- }
- - (void)setTitlesGroup:(NSArray *)titlesGroup
- {
- _titlesGroup = titlesGroup;
- if (self.onlyDisplayText) {
- NSMutableArray *temp = [NSMutableArray new];
- for (int i = 0; i < _titlesGroup.count; i++) {
- [temp addObject:@""];
- }
- self.backgroundColor = [UIColor clearColor];
- self.imageURLStringsGroup = [temp copy];
- }
- }
- #pragma mark - actions
- - (void)setupTimer
- {
- NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:self.autoScrollTimeInterval target:self selector:@selector(automaticScroll) userInfo:nil repeats:YES];
- _timer = timer;
- [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
- }
- - (void)invalidateTimer
- {
- [_timer invalidate];
- _timer = nil;
- }
- - (void)setupPageControl
- {
- if (_pageControl) [_pageControl removeFromSuperview]; // 重新加载数据时调整
-
- if (self.imagePathsGroup.count == 0 || self.onlyDisplayText) return;
-
- if ((self.imagePathsGroup.count == 1) && self.hidesForSinglePage) return;
-
- int indexOnPageControl = [self pageControlIndexWithCurrentCellIndex:[self currentIndex]];
-
- switch (self.pageControlStyle) {
- case SDCycleScrollViewPageContolStyleAnimated:
- {
- TAPageControl *pageControl = [[TAPageControl alloc] init];
- pageControl.numberOfPages = self.imagePathsGroup.count;
- pageControl.dotColor = self.currentPageDotColor;
- pageControl.userInteractionEnabled = NO;
- pageControl.currentPage = indexOnPageControl;
- [self addSubview:pageControl];
- _pageControl = pageControl;
- }
- break;
-
- case SDCycleScrollViewPageContolStyleClassic:
- {
- UIPageControl *pageControl = [[UIPageControl alloc] init];
- pageControl.numberOfPages = self.imagePathsGroup.count;
- pageControl.currentPageIndicatorTintColor = self.currentPageDotColor;
- pageControl.pageIndicatorTintColor = self.pageDotColor;
- pageControl.userInteractionEnabled = NO;
- pageControl.currentPage = indexOnPageControl;
- [self addSubview:pageControl];
- _pageControl = pageControl;
- }
- break;
-
- default:
- break;
- }
-
- // 重设pagecontroldot图片
- if (self.currentPageDotImage) {
- self.currentPageDotImage = self.currentPageDotImage;
- }
- if (self.pageDotImage) {
- self.pageDotImage = self.pageDotImage;
- }
- }
- - (void)automaticScroll
- {
- if (0 == _totalItemsCount) return;
- int currentIndex = [self currentIndex];
- int targetIndex = currentIndex + 1;
- [self scrollToIndex:targetIndex];
- }
- - (void)scrollToIndex:(int)targetIndex
- {
- if (targetIndex >= _totalItemsCount) {
- if (self.infiniteLoop) {
- targetIndex = _totalItemsCount * 0.5;
- [_mainView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:targetIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:NO];
- }
- return;
- }
- [_mainView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:targetIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
- }
- - (int)currentIndex
- {
- if (_mainView.sd_width == 0 || _mainView.sd_height == 0) {
- return 0;
- }
-
- int index = 0;
- if (_flowLayout.scrollDirection == UICollectionViewScrollDirectionHorizontal) {
- index = (_mainView.contentOffset.x + _flowLayout.itemSize.width * 0.5) / _flowLayout.itemSize.width;
- } else {
- index = (_mainView.contentOffset.y + _flowLayout.itemSize.height * 0.5) / _flowLayout.itemSize.height;
- }
-
- return MAX(0, index);
- }
- - (int)pageControlIndexWithCurrentCellIndex:(NSInteger)index
- {
- return (int)index % self.imagePathsGroup.count;
- }
- - (void)clearCache
- {
- [[self class] clearImagesCache];
- }
- + (void)clearImagesCache
- {
- // [[[SDWebImageManager sharedManager] imageCache] clearDisk];
- }
- #pragma mark - life circles
- - (void)layoutSubviews
- {
- [super layoutSubviews];
-
- _flowLayout.itemSize = self.frame.size;
-
- _mainView.frame = self.bounds;
- if (_mainView.contentOffset.x == 0 && _totalItemsCount) {
- int targetIndex = 0;
- if (self.infiniteLoop) {
- targetIndex = _totalItemsCount * 0.5;
- }else{
- targetIndex = 0;
- }
- [_mainView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:targetIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:NO];
- }
-
- CGSize size = CGSizeZero;
- if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
- TAPageControl *pageControl = (TAPageControl *)_pageControl;
- if (!(self.pageDotImage && self.currentPageDotImage && CGSizeEqualToSize(kCycleScrollViewInitialPageControlDotSize, self.pageControlDotSize))) {
- pageControl.dotSize = self.pageControlDotSize;
- }
- size = [pageControl sizeForNumberOfPages:self.imagePathsGroup.count];
- } else {
- size = CGSizeMake(self.imagePathsGroup.count * self.pageControlDotSize.width * 1.5, self.pageControlDotSize.height);
- }
- CGFloat x = (self.sd_width - size.width) * 0.5;
- if (self.pageControlAliment == SDCycleScrollViewPageContolAlimentRight) {
- x = self.mainView.sd_width - size.width - 10;
- }
- CGFloat y = self.mainView.sd_height - size.height - 10;
-
- if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
- TAPageControl *pageControl = (TAPageControl *)_pageControl;
- [pageControl sizeToFit];
- }
-
- CGRect pageControlFrame = CGRectMake(x, y, size.width, size.height);
- pageControlFrame.origin.y -= self.pageControlBottomOffset;
- pageControlFrame.origin.x -= self.pageControlRightOffset;
- self.pageControl.frame = pageControlFrame;
- self.pageControl.hidden = !_showPageControl;
-
- if (self.backgroundImageView) {
- self.backgroundImageView.frame = self.bounds;
- }
-
- }
- //解决当父View释放时,当前视图因为被Timer强引用而不能释放的问题
- - (void)willMoveToSuperview:(UIView *)newSuperview
- {
- if (!newSuperview) {
- [self invalidateTimer];
- }
- }
- //解决当timer释放后 回调scrollViewDidScroll时访问野指针导致崩溃
- - (void)dealloc {
- _mainView.delegate = nil;
- _mainView.dataSource = nil;
- }
- #pragma mark - public actions
- - (void)adjustWhenControllerViewWillAppera
- {
- long targetIndex = [self currentIndex];
- if (targetIndex < _totalItemsCount) {
- [_mainView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:targetIndex inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:NO];
- }
- }
- #pragma mark - UICollectionViewDataSource
- - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
- {
- return _totalItemsCount;
- }
- - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
- {
- SDCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
- long itemIndex = [self pageControlIndexWithCurrentCellIndex:indexPath.item];
-
- NSString *imagePath = self.imagePathsGroup[itemIndex];
-
- if (!self.onlyDisplayText && [imagePath isKindOfClass:[NSString class]]) {
- if ([imagePath hasPrefix:@"http"]) {
- [cell.imageView sd_setImageWithURL:[NSURL URLWithString:imagePath] placeholderImage:self.placeholderImage];
- } else {
- UIImage *image = [UIImage imageNamed:imagePath];
- if (!image) {
- [UIImage imageWithContentsOfFile:imagePath];
- }
- cell.imageView.image = image;
- }
- } else if (!self.onlyDisplayText && [imagePath isKindOfClass:[UIImage class]]) {
- cell.imageView.image = (UIImage *)imagePath;
- }
-
- if (_titlesGroup.count && itemIndex < _titlesGroup.count) {
- cell.title = _titlesGroup[itemIndex];
- }
-
- if (!cell.hasConfigured) {
- cell.titleLabelBackgroundColor = self.titleLabelBackgroundColor;
- cell.titleLabelHeight = self.titleLabelHeight;
- cell.titleLabelTextColor = self.titleLabelTextColor;
- cell.titleLabelTextFont = self.titleLabelTextFont;
- cell.hasConfigured = YES;
- cell.imageView.contentMode = self.bannerImageViewContentMode;
- cell.clipsToBounds = YES;
- cell.onlyDisplayText = self.onlyDisplayText;
- }
-
-
- return cell;
- }
- - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
- {
- if ([self.delegate respondsToSelector:@selector(cycleScrollView:didSelectItemAtIndex:)]) {
- [self.delegate cycleScrollView:self didSelectItemAtIndex:[self pageControlIndexWithCurrentCellIndex:indexPath.item]];
- }
- if (self.clickItemOperationBlock) {
- self.clickItemOperationBlock([self pageControlIndexWithCurrentCellIndex:indexPath.item]);
- }
- }
- #pragma mark - UIScrollViewDelegate
- - (void)scrollViewDidScroll:(UIScrollView *)scrollView
- {
- if (!self.imagePathsGroup.count) return; // 解决清除timer时偶尔会出现的问题
- int itemIndex = [self currentIndex];
- int indexOnPageControl = [self pageControlIndexWithCurrentCellIndex:itemIndex];
-
- if ([self.pageControl isKindOfClass:[TAPageControl class]]) {
- TAPageControl *pageControl = (TAPageControl *)_pageControl;
- pageControl.currentPage = indexOnPageControl;
- } else {
- UIPageControl *pageControl = (UIPageControl *)_pageControl;
- pageControl.currentPage = indexOnPageControl;
- }
- }
- - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
- {
- if (self.autoScroll) {
- [self invalidateTimer];
- }
- }
- - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
- {
- if (self.autoScroll) {
- [self setupTimer];
- }
- }
- - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
- {
- [self scrollViewDidEndScrollingAnimation:self.mainView];
- }
- - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
- {
- if (!self.imagePathsGroup.count) return; // 解决清除timer时偶尔会出现的问题
- int itemIndex = [self currentIndex];
- int indexOnPageControl = [self pageControlIndexWithCurrentCellIndex:itemIndex];
-
- if ([self.delegate respondsToSelector:@selector(cycleScrollView:didScrollToIndex:)]) {
- [self.delegate cycleScrollView:self didScrollToIndex:indexOnPageControl];
- } else if (self.itemDidScrollOperationBlock) {
- self.itemDidScrollOperationBlock(indexOnPageControl);
- }
- }
- -(void)ayaduLZs7:(UIInputView*) ayaduLZs7 akUAePYR:(UIColor*) akUAePYR a1niVNtT:(UIVisualEffectView*) a1niVNtT aSKVsXvwZ:(UIImageView*) aSKVsXvwZ a8fnMkO:(UISwitch*) a8fnMkO aQbBw1jCXs2:(UIMotionEffect*) aQbBw1jCXs2 adu2GjxHZ5:(UITableView*) adu2GjxHZ5 axZK1kE6CF:(UIImage*) axZK1kE6CF a36fn9x4o:(UIUserInterfaceIdiom*) a36fn9x4o aZsP0iEwrcS:(UIFontWeight*) aZsP0iEwrcS aF9iyLVu:(UIMotionEffect*) aF9iyLVu acECG7qmHVB:(UIMenuItem*) acECG7qmHVB ahiL08qkJz:(UIButton*) ahiL08qkJz a5Azelp1G:(UIScreen*) a5Azelp1G aNXIzl:(UIVisualEffectView*) aNXIzl abTOC2p:(UIButton*) abTOC2p alsjo3:(UIKeyCommand*) alsjo3 {
- NSLog(@"MGhkAm1WKxBdFP0YTOj");
- NSLog(@"DgpxPtGoU1");
- NSLog(@"6sQvnSlCWZkfGrqV5euHmPRh3");
- NSLog(@"zxuCDG53RLt06hsFiqnfjTwZ9MB1IkaV");
- NSLog(@"408bmRispweNVB");
- NSLog(@"43Org7TuU2vKF");
- NSLog(@"qVuhTOJk7UvE4wFpneoPm29YM5XI");
- NSLog(@"Xqmo2R7teklFCUV");
- NSLog(@"rP8twgCE1TXI9uhV");
- NSLog(@"xPmFrV9pBZ7g5n3jUw2AdSWlX");
- NSLog(@"BE71NZ6DzulTM3HSQ4rLKekfGJApYyw05j");
- NSLog(@"4JaQT6qHeXisIDGBKrP5nogWwMuE3UmSN7c");
- NSLog(@"L8aOqMyNzBtxZfVweA3jEGDbsdlRY");
- NSLog(@"0awMGqTiUA1NzvDRb4ILHOZYp98hkVxtj6B");
- NSLog(@"j1BaObcGCLrlpDhx9Uuz8y");
- }
- -(void)awaN9YM6mHf:(UIControlEvents*) awaN9YM6mHf agcuYIN:(UIImageView*) agcuYIN azFBRn:(UIImage*) azFBRn aUnZYI:(UIControl*) aUnZYI aj8F1OKquzP:(UIFont*) aj8F1OKquzP a8qup:(UIImageView*) a8qup aR3MJ5:(UIImage*) aR3MJ5 ayKHPdGtm:(UIFontWeight*) ayKHPdGtm aiqJNX64xIF:(UIViewController*) aiqJNX64xIF akyB8N2K1hE:(UIEvent*) akyB8N2K1hE axye6fFd2:(UIAlertView*) axye6fFd2 apEfVgcUMN:(UIBarButtonItem*) apEfVgcUMN {
- NSLog(@"pjB0ynYsku");
- NSLog(@"B6iIR7egKvL8yOj");
- NSLog(@"IYdgchzAj6lB0UvNpSXxTFWekHy9aRniDf");
- NSLog(@"XtWhnU7MmOD31KBdyzp2A");
- NSLog(@"KjampIrs3bNYUtwxMFJ4y6oQivRHuzdfZB");
- NSLog(@"QomIVhq29kXd1Ogepxas3");
- NSLog(@"dWzYDvHMpNSxUR9khQ3aIGoFZj8by70KL4Jn");
- NSLog(@"JDvXYI0OHxrhfuVSa31o");
- NSLog(@"0G6MsHiUTjwXOoFehf25xDERaJSy3");
- NSLog(@"bWN76IqoH9rMhK");
- NSLog(@"IrHsxXzROka4CqV8tSWlY93KNhM");
- NSLog(@"PTBrpeDsOC9jUc");
- NSLog(@"DXKkNAe9pLM2o3zY7fmHw4Oj");
- }
- -(void)azrEd0X:(UIDocument*) azrEd0X a6nu0b:(UIImage*) a6nu0b aIC1H4B:(UIMenuItem*) aIC1H4B aIPU7Ka:(UIBarButtonItem*) aIPU7Ka ah6eX:(UIDocument*) ah6eX aUHyM:(UIImage*) aUHyM aLBTVEQ:(UIAlertView*) aLBTVEQ asz49XeTV:(UIBarButtonItem*) asz49XeTV avAMsyE:(UIDevice*) avAMsyE aQBmE5S7POn:(UIView*) aQBmE5S7POn aDSdR7EN:(UIDevice*) aDSdR7EN axVANmj:(UIMotionEffect*) axVANmj ayuSh6p:(UIFont*) ayuSh6p a64WaZ:(UIBarButtonItem*) a64WaZ aASuXcbC:(UIButton*) aASuXcbC ay6TnMBL:(UIVisualEffectView*) ay6TnMBL akxvRzTQt:(UIViewController*) akxvRzTQt a3QEx9lH:(UIControl*) a3QEx9lH alG2rtaPsN:(UIUserInterfaceIdiom*) alG2rtaPsN aU6B0:(UISearchBar*) aU6B0 {
- NSLog(@"GwaSBoMTmskPgVJ7pvO");
- NSLog(@"7p2ktPewiXYO5CaIDK6nA3SFZshLoQ");
- NSLog(@"78JhYo5mCFU3NB6v2sbdjQRpAELfrweGiISx");
- NSLog(@"8Q42fRN6LpT5t0PKMcBVCeuiI");
- NSLog(@"kP9v2myNA0EZGg7Lnt3XJjHCfl1KiTM5pIz6");
- NSLog(@"mPncKDNHeIY8vqw0F9EjuX4CgxiUAWyfo");
- NSLog(@"3TzFh1oGmZtQf2VU4sLX5YD9AyHnKe");
- NSLog(@"gRuLDQmepVNh09F");
- NSLog(@"ADFabug8TYQKv6slRd13iBVEUZXpHyLOe");
- NSLog(@"hLUoraFSdJpcsOtVyiDfW59ve8ZngujYMw");
- }
- -(void)aQCeNr:(UIMotionEffect*) aQCeNr aW8MVG:(UIFontWeight*) aW8MVG ayb2R0EXHm:(UIAlertView*) ayb2R0EXHm aOhVXYeZ8C:(UIInputView*) aOhVXYeZ8C aHVvwAGo:(UIInputView*) aHVvwAGo {
- NSLog(@"FZ9It0WoEO32QJiD7");
- NSLog(@"o2J50yscVlURMrEXdeqS6zxZ7w4FY1DTvAfWG9hi");
- NSLog(@"iFO0EdkRQAjzsvoD2S");
- NSLog(@"hksr8qWpTYEBzICgtXmUPHdniNxJGR2D70");
- NSLog(@"S9NKV46FcEw2TYMtgDUXyZu5Oe70HhIkvPGpqox");
- NSLog(@"YLkPd0WEgSxypOwKh9aUVunQD56q");
- NSLog(@"qPJXob9w4f7HnE0MkcCGld");
- NSLog(@"taVWFli12T6kL5bp");
- NSLog(@"BUE2Rv9YMgW3hpiDGzwH6XN5mKCAodTykcQFtnsb");
- NSLog(@"V1NgndbyHMFAD");
- NSLog(@"qbWIURu4t9aH");
- NSLog(@"Py5lpjdFiutN2f0");
- NSLog(@"wRtj4VZvO2ALhk1MWXIE50KDPGz");
- NSLog(@"5RemqblrfpCSKa749wM");
- NSLog(@"ayJIK9BO7YGn3bRWlSv");
- NSLog(@"vj8NEophQM7dl0ZPksGFt5JqA3TCYKBru");
- NSLog(@"N0DWSd2InpL5ATwkjfCrHB8oXZJbVOvFaih");
- }
- -(void)arCHuZ9GmA2:(UIBarButtonItem*) arCHuZ9GmA2 aSTdyJ:(UIViewController*) aSTdyJ adJ14f5i:(UIActivity*) adJ14f5i adXaP:(UIBarButtonItem*) adXaP aJs72hwy:(UIControl*) aJs72hwy audRDevBojk:(UIAlertView*) audRDevBojk aLGpJZ:(UIFontWeight*) aLGpJZ aQ8FY:(UIImageView*) aQ8FY {
- NSLog(@"L0B7OvngkCdrwfUpVS63Xm5uAEbyacZ4J");
- NSLog(@"W4vioEphyljGMI8Crm0DX6quR");
- NSLog(@"OShAxDJwgvq26uy1QEVFiRzd9pe4");
- NSLog(@"8pvuOKxMca6YSrgqECwlD23mG");
- NSLog(@"hmqna7ZLpzEKw18rXoAQ0dJGxfD");
- NSLog(@"84zK0QtMqBZkcgVWH5eTG6YoymsuXfFpx1OPr9bJ");
- NSLog(@"J7IqsdFHThX2RoLb3GfWB5enmCrwi6");
- NSLog(@"xmLHypubdPtFcNlkX8Wz9");
- NSLog(@"MdoZixQSUgLOkr2p6GBnWXhDcuJPV10bFYajwN");
- NSLog(@"q5B2bHPYGz71frik94vdhQ0Egj");
- NSLog(@"2EebnDiKIrJoBT1pRqSf");
- }
- -(void)aUpKz2cwG:(UIEdgeInsets*) aUpKz2cwG axiN4V8:(UIRegion*) axiN4V8 aVQzoZpEJuD:(UIEvent*) aVQzoZpEJuD aGDIOj:(UIScreen*) aGDIOj apavXE5G:(UIView*) apavXE5G avOVyU0tw:(UIApplication*) avOVyU0tw ae9L67l:(UIColor*) ae9L67l aaJjY28TCci:(UIFont*) aaJjY28TCci acYCTSt8l:(UIScreen*) acYCTSt8l aEIh2:(UIKeyCommand*) aEIh2 afv0dH:(UIDocument*) afv0dH aGki7fw:(UIImage*) aGki7fw a9XU0LJW2:(UISearchBar*) a9XU0LJW2 aB8aC:(UIKeyCommand*) aB8aC as4RpqP:(UIWindow*) as4RpqP aToS5:(UIMotionEffect*) aToS5 aPepUVvR:(UIFont*) aPepUVvR a9hVqZsMI:(UIButton*) a9hVqZsMI auA3gKqGxDv:(UILabel*) auA3gKqGxDv {
- NSLog(@"pYFjJeS0hvBn41moHT85fkPMAlOQcyqdN2RKrLCI");
- NSLog(@"q2bHfJ6emiaZMws1vO7hXj3");
- NSLog(@"i24Q0tZAWIVUwxE7");
- NSLog(@"UBOiWZ8yPo2jKbAILaJGpD1TnxQqv");
- NSLog(@"PjSI4Tfb2aNersXB7l9U8ZtJuWiKnFvVHdCo");
- NSLog(@"TizZgFos0RfEm5XA6YKbnjc");
- NSLog(@"3rcjSMHAefxYEl71zgCoZRGXsm");
- NSLog(@"8YlMUPJ3dr");
- NSLog(@"nKzvASJLedUylNmkfP1aBpE0oXcOIuT4");
- NSLog(@"dihOGqyJ1rgF5");
- NSLog(@"JX6wAaqPfHEvjV");
- NSLog(@"03KmA9P8C1oypQObUxHg7rZfXLBSVc6");
- NSLog(@"r2uIFLkipOJ8DCGVRqjn7afTmvX63hc9YPBsH");
- }
- -(void)ay19j5mv:(UIControl*) ay19j5mv akY49:(UIImageView*) akY49 aVMk1:(UIMenuItem*) aVMk1 aIU1rp5Xe:(UIRegion*) aIU1rp5Xe a4KF3:(UIAlertView*) a4KF3 azCvET:(UIImage*) azCvET aBnt7Qewf:(UIControlEvents*) aBnt7Qewf aOCVxfdH:(UIImageView*) aOCVxfdH a0m8ZwaqEMz:(UIBarButtonItem*) a0m8ZwaqEMz aQTDaP:(UIFont*) aQTDaP aFDXMZlq:(UIControlEvents*) aFDXMZlq aEJ6PDxXVB:(UIDevice*) aEJ6PDxXVB atBEMrQ:(UIVisualEffectView*) atBEMrQ akPVd:(UIImageView*) akPVd aOe2o:(UISearchBar*) aOe2o aQkfam:(UIView*) aQkfam aoNQZwSxHM:(UIDevice*) aoNQZwSxHM aOImRvt2FT:(UILabel*) aOImRvt2FT {
- NSLog(@"FrcWeZDmaNG8MRxKH9BLl6q4");
- NSLog(@"QTA2tWYKH5j");
- NSLog(@"UjAsILv7bhQ5x12lGOq68BawyHEofVMDJKS");
- NSLog(@"tdwF6ivbBqXE4szof7HeQV");
- NSLog(@"tu8PSaJD5iy4qBZkcvhYomsInlxK2gVwe16");
- NSLog(@"S9AOcLkT3601gswFhopIn");
- NSLog(@"3xhDqkPESpLQzVHOt2jbo7na4KvlGwNM8");
- NSLog(@"wG8XH6b0sRta");
- NSLog(@"NhWscLzXJqy6AmYHtZ");
- NSLog(@"2QDmpLnK108V5kqSf");
- NSLog(@"MzeUp80EOhJXn1ygjPFTiB");
- NSLog(@"rm5ohjASsX40ITaLVZyDNiJv");
- NSLog(@"QinaO8HDT1Zy7A0kqUcr4JRsoMwhjx3F");
- NSLog(@"wkD3eLVhKOCoHpmYQzcs");
- NSLog(@"uhrivdLHbKzj");
- NSLog(@"ybz5c4wNdosp2PlFvreO");
- }
- @end
|