12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //
- // CycleScrollView.h
- // PagedScrollView
- //
- // Created by 陈政 on 14-1-23.
- // Copyright (c) 2014年 Apple Inc. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- @interface CycleScrollView : UIView
- @property (nonatomic , strong) NSTimer *animationTimer;
- @property (nonatomic , assign) NSTimeInterval animationDuration;
- @property (nonatomic , strong) UIScrollView *scrollView;
- @property (nonatomic, assign) NSInteger pageIndex;
- /**
- * 初始化
- *
- * @param frame frame
- * @param animationDuration 自动滚动的间隔时长。如果<=0,不自动滚动。
- *
- * @return instance
- */
- - (id)initWithFrame:(CGRect)frame animationDuration:(NSTimeInterval)animationDuration;
- /**
- 数据源:获取总的page个数
- **/
- @property (nonatomic , copy) NSInteger (^totalPagesCount)(void);
- /**
- 数据源:获取第pageIndex个位置的contentView
- **/
- @property (nonatomic , copy) UIView *(^fetchContentViewAtIndex)(NSInteger pageIndex);
- /**
- 当点击的时候,执行的block
- **/
- @property (nonatomic , copy) void (^TapActionBlock)(NSInteger pageIndex);
- /**
- 当翻页的时候,执行的block, 更换pageControl 页数
- **/
- @property (nonatomic , copy) void (^pageDidChange)(NSInteger pageIndex);
- - (void)invalidTimer;
- @end
|