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) {
UUContentAlignmenttNormal = 0, //内容居中>>图左文右
UUContentAlignmentCenterImageRight, //内容居中>>图右文左
UUContentAlignmentCenterImageTop, //内容居中>>图上文右
UUContentAlignmentCenterImageBottom, //内容居中>>图下文上
UUContentAlignmentLeftImageLeft, //内容居左>>图左文右
UUContentAlignmentLeftImageRight, //内容居左>>图右文左
UUContentAlignmentRightImageLeft, //内容居右>>图左文右
UUContentAlignmentRightImageRight //内容居右>>图右文左
};
有问题可以联系我【QQ:1539901764 要备注来源哦】,如果这个工具对你有些帮助,请给我一个star、watch。O(∩_∩)O谢谢