DGThumbUpButton.h 750 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // DGThumbUpButton.h
  3. // DGThumbUpButton
  4. //
  5. // Created by Desgard_Duan on 16/6/9.
  6. // Copyright © 2016年 Desgard_Duan. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSUInteger, DGThumbUpButtonType) {
  10. DGThumbUpExplosionType = 0
  11. };
  12. @interface DGThumbUpButton : UIButton
  13. //是否被选中
  14. @property (assign,nonatomic) BOOL isSelected;
  15. //是否展示爆炸动画
  16. @property (assign,nonatomic) BOOL isShowAnimation;
  17. - (instancetype) initWithFrame: (CGRect)frame isPress: (BOOL)press;
  18. - (void)setActionUpInside:(void (^)(BOOL selected))action;
  19. //执行取消点赞效果
  20. - (void) popOutsideWithDuration: (NSTimeInterval) duringTime;
  21. //执行点赞效果
  22. - (void) popInsideWithDuration: (NSTimeInterval) duringTime;
  23. @end