RatingBar.h 872 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // RatingBar.h
  3. // MyRatingBar
  4. //
  5. // Created by Leaf on 14-8-28.
  6. // Copyright (c) 2014年 Leaf. All rights reserved.
  7. //
  8. // 版权属于原作者
  9. // http://code4app.com (cn) http://code4app.net (en)
  10. // 发布代码于最专业的源码分享网站: Code4App.com
  11. #import <UIKit/UIKit.h>
  12. typedef void (^MyBlockType)(id);
  13. @interface RatingBar : UIView
  14. {
  15. MyBlockType starNumBlock;
  16. }
  17. /**
  18. *设置星星数量
  19. */
  20. @property (nonatomic,assign) NSInteger starNumber;
  21. /**
  22. *调整底部视图的颜色
  23. */
  24. @property (nonatomic,strong) UIColor *viewColor;
  25. /**
  26. *是否允许可触摸
  27. */
  28. @property (nonatomic,assign) BOOL enable;
  29. /**
  30. 初始化
  31. @param frame zzz
  32. @param flag 标志位,if flag = 1,star左边对齐(无空格)
  33. @return zzz
  34. */
  35. - (id)initWithFrame:(CGRect)frame Flag:(BOOL)flag;
  36. - (void)changeStarNumberBlock:(MyBlockType)starBlock;
  37. @end