Latest 0.2.3
Homepage https://github.com/DaskiOFF/RKAutoLayout
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

CI Status
Cocoapods compatible
codecov
docs
Version
Platform
Swift Version
License

Easy AutoLayout

TL;DR

let view1: UIView = UIView()
let view2: UIView = UIView()

view1.addSubview(view2)

/// Add all
view1.rk_alAdd(
    size: [.width(view2), .height(100)], 
    center: [.centerX()], 
    edge: [.top(10), .bottom(view2, offset: -34)], isActive: false)
view1.rk_alAdd(size: [.height(100)], edge: [.top(min: 10), .bottom(view2, offset: -34)], isActive: false)
view1.rk_alAdd(center: [.centerX()], edge: [.top(10), .bottom(max: view2.topAnchor, offset: -34)])

/// Edges
view1.rk_alEdgeSuperViewBounds()
view1.rk_alEdge(.top(200))
view1.rk_alEdge(.top(bottomAnchor, offset: -43))
view1.rk_alEdge(.top(0), .left(10), isActive: false)

/// Size
view1.rk_alSize(.width(50), .height(view2, multiplier: 3))
view1.rk_alSize(.width(view2.heightAnchor, priority: .low), .height(view2))
view1.rk_alSize(.width(200), .height(min: 60), .height(max: 220))

/// Center
view1.rk_alCenterSuperView()
view1.rk_alCenter(.centerX(100), .centerY(300))
view1.rk_alCenter(.centerX(), .centerY(view2.topAnchor))
view1.rk_alCenter(values: RKConstraintCenter.center(view2, offsetX: -100, offsetY: -100))

/// Baseline
view1.rk_alBaseline(.firstBaseline(100), .lastBaseline(300))

Requirements

  • iOS 9.0 and above
  • Swift 4.1

Documentations

Full documentation for the latest release is available here

Installation

RKAutoLayout is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'RKAutoLayout', '~> 0.2'

Author

DaskiOFF, [email protected]

License

RKAutoLayout is available under the MIT license. See the LICENSE file for more info.

Dependencies

Последний раз проект собирался с версией Xcode указанной в файле .xcode-version (Подробнее)

Последний раз проект собирался с версией Swift указанной в файле .swift-version

Latest podspec

{
    "name": "RKAutoLayout",
    "version": "0.2.3",
    "summary": "Easy Auto Layout",
    "description": "Easy Auto Layoutnn0.2.3n  Swift 4.2nn0.2.2n  Fix rkSafeAreaLayoutGuidenn0.2.1n  Fix safearea for iOS < 11. Update docsnn0.2.0n  Update codebase and add support other constraintsnn0.1.1n  Update READMEnn0.1.0n  Init",
    "homepage": "https://github.com/DaskiOFF/RKAutoLayout",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "DaskiOFF": "[email protected]"
    },
    "source": {
        "git": "https://github.com/DaskiOFF/RKAutoLayout.git",
        "tag": "0.2.3"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Sources/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This