UIButton+LMUtils.h 903 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // UIButton+LMUtils.h
  3. // LMUtils
  4. //
  5. // Created by hl on 2018/4/17.
  6. // Copyright © 2018年 lam. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface UIButton (LMUtils)
  10. /// 忽略button classs
  11. @property (nonatomic, class, copy)NSArray<NSString *> *ignoreButtons;
  12. /// 忽略target classs
  13. @property (nonatomic, class, copy)NSArray<NSString *> *ignoreTargets;
  14. /// 事件间隔,默认0.5s
  15. @property (nonatomic) NSTimeInterval acceptEventInterval;
  16. @end
  17. @interface UIButton (LMCreate)
  18. /**
  19. 快速设置button状态
  20. @param title title
  21. @param color color
  22. @param font 字体大小
  23. @param image 颜色
  24. @param backgroundImage 背景颜色
  25. @param state 状态
  26. */
  27. - (void)setTitle:(NSString *)title
  28. titleColor:(UIColor *)color
  29. font:(UIFont *)font
  30. image:(UIImage *)image
  31. backgroundImage:(UIImage *)backgroundImage
  32. forState:(UIControlState)state;
  33. @end