ZLImageScrollView.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // ZLImageScrollView.h
  3. // ZLImageScrollViewDemo
  4. //
  5. // Created by Mr.LuDashi on 15/8/20.
  6. // Copyright (c) 2015年 zeluli. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. //点击图片的Block回调,参数当前图片的索引,也就是当前页数
  10. typedef void(^TapImageViewButtonBlock)(NSInteger imageIndex);
  11. @interface ZLImageScrollView : UIView
  12. //切换图片的时间间隔,可选,默认为3s
  13. @property (nonatomic, assign) CGFloat scrollInterval;
  14. //切换图片时,运动时间间隔,可选,默认为0.7s
  15. @property (nonatomic, assign) CGFloat animationInterVale;
  16. /**********************************
  17. *功能:便利构造器
  18. *参数:滚动视图的Frame, 要显示图片的数组
  19. *返回值:该类的对象
  20. **********************************/
  21. + (instancetype) zlImageScrollViewWithFrame: (CGRect) frame
  22. WithImages: (NSArray *) images;
  23. /**********************************
  24. *功能:便利初始化函数
  25. *参数:滚动视图的Frame, 要显示图片的数组
  26. *返回值:该类的对象
  27. **********************************/
  28. - (instancetype)initWithFrame: (CGRect)frame
  29. WithImages: (NSArray *) images;
  30. /**********************************
  31. *功能:为每个图片添加点击时间
  32. *参数:点击按钮要执行的Block
  33. *返回值:无
  34. **********************************/
  35. - (void) addTapEventForImageWithBlock: (TapImageViewButtonBlock) block;
  36. @end