cdts/xdts-ios 3/TUICalling/Source/UI/Common/UIButton+TUIImageTitleSpacing.h
2023-07-27 09:20:00 +08:00

29 lines
833 B
Objective-C
Raw Permalink 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+TUIImageTitleSpacing.h
// TUICalling
//
// Created by noah on 2021/8/24.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, TUIButtonEdgeInsetsStyle) {
TUIButtonEdgeInsetsStyleTop, // Image上Label下
TUIButtonEdgeInsetsStyleLeft, // Image左Label右
TUIButtonEdgeInsetsStyleBottom, // Image下Label上
TUIButtonEdgeInsetsStyleRight // Image右Label左
};
@interface UIButton (TUIImageTitleSpacing)
/// 设置Button的 TitleLabel 和 ImageView 的布局样式,及间距
/// @param style 布局样式,四种之一
/// @param space 图片和文字的间隔
- (void)layoutButtonWithEdgeInsetsStyle:(TUIButtonEdgeInsetsStyle)style imageTitleSpace:(CGFloat)space NS_SWIFT_NAME(layoutButtonWithEdgeInsetsStyle(style:space:));;
@end
NS_ASSUME_NONNULL_END