LuckyDrawView.h 966 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // LuckyDrawView.h
  3. // 大转盘
  4. //
  5. // Created by 谭启宏 on 16/3/2.
  6. // Copyright © 2016年 tqh. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "packageRoolModel.h"
  10. @protocol LuckyDrawViewDelegate <NSObject>
  11. - (void)LuckyDrawViewDidFinishWidthIndex:(NSInteger)index;
  12. @optional
  13. - (void)LuckyDrawWheelDidFinishWidthIndex:(packageRoolModel *)model index:(NSInteger )index;
  14. @end
  15. //抽奖用的大转盘
  16. @interface LuckyDrawView : UIView
  17. {
  18. UIImageView* disk;
  19. float angle;
  20. NSTimer* timer;
  21. BOOL updateEnable;
  22. }
  23. - (float) toAngle:(CGPoint) v;
  24. - (void)setRotate:(float)degress;
  25. - (CGPoint) cgpSub:(CGPoint)v1: (CGPoint)v2;
  26. - (void)update;
  27. @property (nonatomic,assign)NSInteger numberIndex;
  28. @property (nonatomic,assign)id<LuckyDrawViewDelegate>delegate;
  29. @end
  30. /**
  31. //WithFrame:CGRectMake(2, 2, 109, 109)]
  32. //self.playButton.center = CGPointMake(CGRectGetWidth(self.jiantouBtn)/2, CGRectGetWidth(self.bounds)/2);
  33. */