Files
featherVoice/QXLive/Tools/Category/UIButton+QX.h
2025-08-08 10:49:36 +08:00

35 lines
949 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// 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