Files
real-e-party-iOS/YuMi/Modules/YMMine/View/XPButton.h
edwinQQQ a35a711be6 chore: Initial clean commit
- Removed YuMi/Library/ (138 MB, not tracked)
- Removed YuMi/Resources/ (23 MB, not tracked)
- Removed old version assets (566 files, not tracked)
- Excluded Pods/, xcuserdata/ and other build artifacts
- Clean repository optimized for company server deployment
2025-10-09 16:19:14 +08:00

44 lines
938 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.

//
// YMButton.h
// YUMI
//
// Created by XY on 2023/2/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, XPButtonStyle){
XPButtonImageLeft = 0, //图片在左
XPButtonImageRight = 1, //图片在右
XPButtonImageTop = 2, //图片在上
XPButtonImageBottom = 3, //图片在下
};
@interface XPButton : UIButton
/**
图片的位置,上、下、左、右,默认是图片居左
*/
@property (nonatomic, assign) XPButtonStyle buttonStyle;
/**
文字与图片之间的间距默认是0
*/
@property (nonatomic, assign) CGFloat padding;
/**
创建button
@param buttonType button的类型
@param space 图片距离button的边距如果图片比较大的此时有效果
如果图片比较小,没有效果,默认居中;
@return button
*/
+ (id)buttonWithType:(UIButtonType)buttonType withSpace:(CGFloat)space;
@end
NS_ASSUME_NONNULL_END