Latest 0.0.6
Homepage https://github.com/ONECATYU/FlexKit
License MIT
Platforms ios 8.0, requires ARC
Dependencies YogaKit
Frameworks UIKit, Foundation
Authors

YogaKit的插件,增加链式调用和虚拟div。YogaKit在面对复杂布局时,会导致视图层级增多。
不入侵YogaKit的代码,可以在项目中直接使用YogaKit,而完全不使用FlexKit.

使用

  • 可配合UITableView+FDTemplateLayoutCell使用,避免手动计算高度
    FlexKit
contentView.makeLayout { (make) in
    make.padding(12)
    make.addChild(self.titleLabel)
    make.addChild(self.contentLabel).marginTop(10)
    make.addChild(self.contentImgView).marginTop(10)
    make.addChild(nil, withMakeLayout: { (make) in
        make.flexDirection(.row).justifyContent(.spaceBetween).marginTop(10)
        make.addChild(self.userNameLabel)
        make.addChild(self.timeLabel)
    })
}

///使用flexLayout而不是YogaKit中的contentView.yoga
///可以直接使用YogaKit,然后通过contentView.yoga来更新视图布局
contentView.flexLayout.applyLayout(preservingOrigin: false)

Latest podspec

{
    "name": "FlexKit",
    "version": "0.0.6",
    "summary": "FlexLayout,u652fu6301u94feu5f0fu8c03u7528,u865au62dfdiv",
    "description": "*u94feu5f0fu8c03u7528n*u865au62dfdivn*u57fau4e8eYogaKit",
    "homepage": "https://github.com/ONECATYU/FlexKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ONECATYU": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ONECATYU/FlexKit.git",
        "tag": "0.0.6"
    },
    "source_files": [
        "FlexKit",
        "FlexKit/**/*.{h,m}"
    ],
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true,
    "dependencies": {
        "YogaKit": []
    }
}

Pin It on Pinterest

Share This