Latest0.1.1
Homepagehttps://github.com/Loadar/CPFChain-UIKit
LicenseMIT
Platformsios 8.0, requires ARC
DependenciesCPFChain
Authors

CPFChain-UIKit

UIKit链式调用

使用方法

// 支持Pods
pod 'CPFChain+UIKit', '~>0.0.1'
// 引入对应模块
import CPFChain+UIKit

示例

// 明确view层次
let view = UIView()
let label = UILabel()
let imageView = UIImageView()
let containerView = UIView()
let detailLabel = UILabel()

view.cpf
    .add(lable)
    .add(imageView)
    .add(containerView.cpf
        .add(detailLabel))
// 属性设置
let textField = UITextField()
let imageView = UIImageView()
textField.cpf
    .font(UIFont.systemFont(ofSize: 14))
    .text(alignment: .left)
    .textColor(.purple)
    .clearButton(mode: .whileEditing)
    .keyboard(type: .numberPad)
    .returnKey(type: .next)
    .placeholder("输入手机号")
    .delegate(self)
imageView.cpf
    .image(UIImage(named: "xxx"))
    .content(mode: .scaleAspectFit)

Latest podspec

{
    "name": "CPFChain+UIKit",
    "version": "0.1.1",
    "summary": "UIKitu94feu5f0fu8c03u7528",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "chenpengfei": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Loadar/CPFChain-UIKit.git",
        "tag": "0.1.1"
    },
    "homepage": "https://github.com/Loadar/CPFChain-UIKit",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Classes/*.swift",
    "requires_arc": true,
    "dependencies": {
        "CPFChain": []
    }
}

Pin It on Pinterest

Share This