Latest 1.0
Homepage https://github.com/hongcaiyu/Bees
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0
Authors

Bees

Build Status
Platform
Cocoapods Compatible
Carthage
Language

Bees 是一个简单易用的自动布局库,复杂的布局只需要几句简单的代码就可以完成。

如:


view0.bee.size == CGSize(width: 111, height: 111)

view1.bee.center == superView.bee.center

view2.bee.right.bottom == superView.bee.right.bottom.sub(10)

view3.bee.edges == superView.bee.edges.inset(10)

...

目录

环境

  • iOS 8.0+/tvOS 9.0+/macOS 10.10+
  • Xcode 9.0+
  • Swift 4.0+

安装

CocoaPods

  pod 'Bees'

Carthage

  github "hongcaiyu/Bees"

使用

快速上手

import UIKit
import Bees

class ViewController: UIViewController {

    lazy var redView = UIView()
    lazy var blueView = UIView()

    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.addSubview(redView)
        self.view.addSubview(blueView)

        redView.bee.edges == self.view.bee.edges.inset(top: 10, bottom: 10)
        blueView.bee.size == redView.bee.size.mul(0.5)
        blueView.bee.left.top == redView.bee.left.add(10).top.add(10)

    }

}

使用文档

License

Bees is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "Bees",
    "version": "1.0",
    "summary": "u7b80u5355u6613u7528u7684Swiftu5e03u5c40u5e93",
    "description": ""Bees u662fu4e00u4e2au7b80u5355u6613u7528u7684u5e03u5c40u5e93uff0cu652fu6301u94feu5f0fu8c03u7528u3002u51cfu5c11u4e86u4f7fu7528u4ee3u7801u81eau52a8u5e03u5c40u65f6u7684u4ee3u7801u91cfu3002"",
    "homepage": "https://github.com/hongcaiyu/Bees",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Caiyu Hong": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/hongcaiyu/Bees.git",
        "tag": "1.0"
    },
    "source_files": "Bees/*.swift"
}

Pin It on Pinterest

Share This