Latest 1.1
Homepage https://github.com/CheeryLau/UUButton
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, UIKit
Authors

License MIT 
CocoaPods 
CocoaPods 

UUButton

安装 [CocoaPods]

  1. pod "UUButton";
  2. pod install / pod update;
  3. #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                   //内容居右>>图右文左
};

END

有问题可以联系我【QQ:1539901764 要备注来源哦】,如果这个工具对你有些帮助,请给我一个star、watch。O(∩_∩)O谢谢

Latest podspec

{
    "name": "UUButton",
    "version": "1.1",
    "summary": "A button that focuses on the way of content alignment.",
    "homepage": "https://github.com/CheeryLau/UUButton",
    "license": "MIT",
    "authors": {
        "Cheery Lau": "[email protected]"
    },
    "source": {
        "git": "https://github.com/CheeryLau/UUButton.git",
        "tag": "1.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "UUButton/**/*.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This