TCSwiftCss 0.1.11

TCSwiftCss 0.1.11

truextcfans 维护。



TCSwiftCss 0.1.11

  • truextcfans

TCSwiftCss

CI Status Version License Platform

示例

要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install

需求

安装

TCSwiftCss 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

  pod 'TCSwiftCss', :git => 'https://github.com/truextcfans/TCSwiftCss.git'

用法

    let v1:UILabel = UILabel()
    let v2:UILabel = UILabel()
    let v3:UILabel = UILabel()
    let v4:UILabel = UILabel()
    
    ## before
    view.addSubview(v1)
    view.addSubview(v2)
    view.addSubview(v3)
    v3.addSubview(v4)
    ## after
    view += [v1,v2,v3]
    v3 += v4
    
    ## before
    v1.backgroundColor = UIColor.red
    v1.font = UIFont.CustomFontOfSize(font: 12)
    v2.backgroundColor = UIColor.red
    v2.font = UIFont.CustomFontOfSize(font: 12)
    ## after
    v1 += UIColor.blue.bgCss
    v1 += 12.fontCss
    v2 += UIColor.red.bgCss
    v2 += 12.fontCss
    ## or
    let lableCss = UIColor.red.bgCss + 12.fontCss
    v1 += lableCss
    v2 += lableCss

作者

truextcfans, [email protected]

许可协议

TCSwiftCss 在 MIT 许可协议下可用。更多信息请见 LICENSE 文件。