UIButton+PBImageTitleSpacing.h 893 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // UIButton+PBImageTitleSpacing.h
  3. // NgariDoctorBaseUI
  4. //
  5. // Created by LStar on 2018/7/23.
  6. // Copyright © 2018年 NgariHealth. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSUInteger, PBButtonEdgeInsetsStyle) {
  10. /** image在上,label在下 */
  11. PBButtonEdgeInsetsStyleTop,
  12. /** image在左,label在右 */
  13. PBButtonEdgeInsetsStyleLeft,
  14. /** image在下,label在上 */
  15. PBButtonEdgeInsetsStyleBottom,
  16. /** image在右,label在左 */
  17. PBButtonEdgeInsetsStyleRight //
  18. };
  19. @interface UIButton (/*PBImageTitleSpacing*/)
  20. /**
  21. * 设置button的titleLabel和imageView的布局样式,及间距
  22. *
  23. * @param style titleLabel和imageView的布局样式
  24. * @param space titleLabel和imageView的间距
  25. */
  26. - (void)layoutButtonWithEdgeInsetsStyle:(PBButtonEdgeInsetsStyle)style
  27. imageTitleSpace:(CGFloat)space;
  28. @end