Latest 0.1.0
Homepage https://github.com/AbooJan/AJ_UIKit
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Foundation
Authors

一些常用的UI控件封装, 支持Storyboard和纯代码

圆角按钮 CommonButton

  let testBtn = CommonButton(type: .Custom);
  testBtn.frame = CGRectMake(20.0, 90.0, 100.0, 40.0);
  testBtn.backgroundColor = UIColor.orangeColor();
  testBtn.setTitleColor(UIColor.whiteColor(), forState: .Normal);
  testBtn.setTitle("测试", forState: .Normal);
  testBtn.addTarget(self, action: #selector(ViewController.testBtnClick(_:)), forControlEvents: .TouchUpInside);

  self.view.addSubview(testBtn);

单选项 Checkbox

  self.checkboxBtn.checkboxImageAlignment = .Right;
  self.checkboxBtn.checkedImage = UIImage(named: "ic_check_1");
  self.checkboxBtn.uncheckedImage = UIImage(named: "ic_check_0");
  self.checkboxBtn.isCheck = true;
  self.checkboxBtn.canCheck = false;
  self.checkboxBtn.title = "checkbox标题";
  self.checkboxBtn.titleFont = UIFont.systemFontOfSize(15.0);
  self.checkboxBtn.privateDelegate = self;

可上下对齐的Label AJLabel

 let testLabel = AJLabel(frame: CGRectMake(20.0, 200.0, 100.0, 40.0));
 testLabel.backgroundColor = UIColor.lightGrayColor();
 testLabel.verticalTextAlignment = .Top; // 垂直方向对齐方式
 testLabel.textEdgeInsets = UIEdgeInsetsMake(0.0, 8.0, 0.0, 0.0); // 边间距
 testLabel.text = "测试Label";
 self.view.addSubview(testLabel);

类似TextField 的TextView AJTextView

 testTV.maxLetterCount = 20;
 testTV.isShowLetterCount = true;
// testTV.limitContentLength = true;
 testTV.placeholder = "请输入内容";
 print("是否超出字数:(testTV.isOverMaxLength)");

Latest podspec

{
    "name": "AJ_UIKit",
    "version": "0.1.0",
    "summary": "u5e38u7528UIu63a7u4ef6u5c01u88c5",
    "description": "u4e00u4e9bu5e38u7528u7684UIu63a7u4ef6u5c01u88c5, u652fu6301Storyboardu548cu7eafu4ee3u7801",
    "homepage": "https://github.com/AbooJan/AJ_UIKit",
    "license": "MIT",
    "authors": {
        "AbooJan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/AbooJan/AJ_UIKit.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "AJ_UIKit/AJ_UIKit/Classes/*.swift",
    "resources": "AJ_UIKit/AJ_UIKit/Classes/AJ_UIKit_Resource.bundle",
    "frameworks": [
        "UIKit",
        "Foundation"
    ]
}

Pin It on Pinterest

Share This