pod "UUButton"
;pod install
/pod update
;#import <UUButton.h>
.
UUButton
继承于UIButton
,枚举内容(图片和文字)对齐方式,简化使用。用法和UIButton
相同,只不过加了以下两个属性:
// 对齐方式
@property (nonatomic, assign) UUContentAlignment contentAlignment;
// 图文间距[默认5.0]
@property (nonatomic, assign) CGFloat spacing;
// 枚举
typedef NS_ENUM(NSInteger, UUContentAlignment) {
UUContentAlignmentNormal = 0, //内容居中>>图左文右
UUContentAlignmentCenterImageRight, //内容居中>>图右文左
UUContentAlignmentCenterImageTop, //内容居中>>图上文右
UUContentAlignmentCenterImageBottom, //内容居中>>图下文上
UUContentAlignmentLeftImageLeft, //内容居左>>图左文右
UUContentAlignmentLeftImageRight, //内容居左>>图右文左
UUContentAlignmentRightImageLeft, //内容居右>>图左文右
UUContentAlignmentRightImageRight //内容居右>>图右文左
};
不定时更新,如有问题欢迎给我留言,我会及时回复。如果这个工具对你有一些帮助,请给我一个star,谢谢。