SLButton.h 725 B

123456789101112131415161718192021222324252627
  1. //
  2. // SLButton.h
  3. //
  4. // Created by wsl on 2020/4/23.
  5. // Copyright © 2020 wsl. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. typedef NS_ENUM(NSUInteger, SLButtonStyle) {
  10. SLButtonStyleImageLeft = 0,// 左图右文
  11. SLButtonStyleImageRight, //右图左文
  12. SLButtonStyleImageTop, //上图下文
  13. SLButtonStyleImageBottom //下图上文
  14. };
  15. /// 自定义Button 自定义文本和图片布局样式
  16. @interface SLButton : UIControl
  17. @property (nonatomic, strong) UIImageView *imageView;
  18. @property (nonatomic, strong) UILabel *titleLabel;
  19. ///设置文本图片布局方式
  20. - (void)setTitleImageLayoutStyle:(SLButtonStyle)titleImageStyle space:(CGFloat)space;
  21. @end
  22. NS_ASSUME_NONNULL_END