CycleScrollView.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // CycleScrollView.h
  3. // PagedScrollView
  4. //
  5. // Created by 陈政 on 14-1-23.
  6. // Copyright (c) 2014年 Apple Inc. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface CycleScrollView : UIView
  10. @property (nonatomic , readonly) UIScrollView *scrollView;
  11. /**
  12. * 初始化
  13. *
  14. * @param frame frame
  15. * @param animationDuration 自动滚动的间隔时长。如果<=0,不自动滚动。
  16. *
  17. * @return instance
  18. */
  19. - (id)initWithFrame:(CGRect)frame animationDuration:(NSTimeInterval)animationDuration;
  20. @property (nonatomic, assign) BOOL hasOnlyTwoDateSource;
  21. /**
  22. 数据源:获取总的page个数
  23. **/
  24. @property (nonatomic , copy) NSInteger (^totalPagesCount)(void);
  25. /**
  26. 数据源:获取第pageIndex个位置的contentView
  27. **/
  28. @property (nonatomic , copy) UIImageView *(^fetchContentViewAtIndex)(NSInteger pageIndex);
  29. /**
  30. 当点击的时候,执行的block
  31. **/
  32. @property (nonatomic , copy) void (^TapActionBlock)(NSInteger pageIndex);
  33. @property (strong,nonatomic) UIPageControl *pageControl;
  34. @end