SDCycleScrollView2.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // SDCycleScrollView2.h
  3. // SDCycleScrollView2
  4. //
  5. // Created by aier on 15-3-22.
  6. // Copyright (c) 2015年 GSD. All rights reserved.
  7. //
  8. /**
  9. *******************************************************
  10. * *
  11. * 感谢您的支持, 如果下载的代码在使用过程中出现BUG或者其他问题 *
  12. * 您可以发邮件到gsdios@126.com 或者 到 *
  13. * https://github.com/gsdios?tab=repositories 提交问题 *
  14. * *
  15. *******************************************************
  16. */
  17. #import <UIKit/UIKit.h>
  18. typedef enum {
  19. SDCycleScrollViewPageContolAlimentRight,
  20. SDCycleScrollViewPageContolAlimentCenter
  21. } SDCycleScrollViewPageContolAliment;
  22. @class SDCycleScrollView2;
  23. @protocol SDCycleScrollView2Delegate <NSObject>
  24. - (void)cycleScrollView:(SDCycleScrollView2 *)cycleScrollView didSelectItemAtIndex:(NSInteger)index;
  25. @end
  26. @interface SDCycleScrollView2 : UIView
  27. @property (nonatomic, strong) NSArray *localizationImagesGroup; // 本地图片数组
  28. @property (nonatomic, strong) NSArray *imageURLsGroup;
  29. @property (nonatomic, strong) NSArray *titlesGroup;
  30. @property (nonatomic, assign) CGFloat autoScrollTimeInterval;
  31. @property (nonatomic, weak) id<SDCycleScrollView2Delegate> delegate;
  32. // 自定义样式
  33. @property (nonatomic, assign) SDCycleScrollViewPageContolAliment pageControlAliment; // 分页控件位置
  34. @property (nonatomic, assign) CGSize pageControlDotSize; // 分页控件小圆标大小
  35. @property (nonatomic, strong) UIColor *dotColor; // 分页控件小圆标颜色
  36. @property (nonatomic, strong) UIColor *titleLabelTextColor;
  37. @property (nonatomic, strong) UIFont *titleLabelTextFont;
  38. @property (nonatomic, strong) UIColor *titleLabelBackgroundColor;
  39. @property (nonatomic, assign) CGFloat titleLabelHeight;
  40. - (void)setImagesGroup:(NSMutableArray *)imagesGroup;
  41. + (instancetype)cycleScrollViewWithFrame:(CGRect)frame imagesGroup:(NSArray *)imagesGroup;
  42. + (instancetype)cycleScrollViewWithFrame:(CGRect)frame imageURLsGroup:(NSArray *)imageURLsGroup;
  43. @end