Files
featherVoice/QXLive/Tools/Category/UIButton+QX.h

35 lines
949 B
C
Raw Normal View History

2025-08-08 10:49:36 +08:00
//
// UIButton+QX.h
// QXLive
//
// Created by 启星 on 2025/4/28.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, QXButtonEdgeInsetsStyle) {
QXButtonEdgeInsetsStyleTop, ///< image在上label在下
QXButtonEdgeInsetsStyleLeft, ///< image在左label在右
QXButtonEdgeInsetsStyleBottom, ///< image在下label在上
QXButtonEdgeInsetsStyleRight ///< image在右label在左
};
@interface UIButton (QX)
/**
button的titleLabel和imageView的布局样式及间距
@param style titleLabel和imageView的布局样式
@param space titleLabel和imageView的b间距
*/
- (void)qx_layoutButtonWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyle)style
imageTitleSpace:(CGFloat)space;
- (void)qx_layoutButtonNOSizeToFitWithEdgeInsetsStyle:(QXButtonEdgeInsetsStyle)style
imageTitleSpace:(CGFloat)space;
@end
NS_ASSUME_NONNULL_END