Latest 1.1.0
Homepage https://github.com/dclelland/Oblong
License MIT
Platforms ios 8.0, osx 10.10, requires ARC
Authors

Tiny Auto Layout DSL for iOS and macOS based on a blog post and talk by Chris Eidhof.

Uses the old (pre-anchor) autolayout API so as to support older versions of iOS and macOS.

Installation

pod 'Oblong'

Examples

Equal bounds:

let parent = UIView()
let child = UIView()

parent.addSubview(child, constraints: [
    equal(.top),
    equal(.trailing),
    equal(.bottom),
    equal(.leading)
])

Centered, sized to 20 by 20 points:

let parent = UIView()
let child = UIView()

parent.addSubview(child, constraints: [
    equalToConstant(.height, constant: 20.0),
    equalToConstant(.width, constant: 20.0),
    equal(.centerX),
    equal(.centerY)
])

Latest podspec

{
    "name": "Oblong",
    "version": "1.1.0",
    "summary": "Tiny Auto Layout DSL for iOS and macOS.",
    "homepage": "https://github.com/dclelland/Oblong",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Daniel Clelland": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dclelland/Oblong.git",
        "tag": "1.1.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "ios": {
        "source_files": [
            "Sources/Oblong.swift",
            "Sources/Oblong-iOS.swift"
        ]
    },
    "osx": {
        "source_files": [
            "Sources/Oblong.swift",
            "Sources/Oblong-macOS.swift"
        ]
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This