Latest 0.1-beta
Homepage https://github.com/nangege/Cassowary
License MIT
Platforms ios 8.0, requires ARC
Authors

Cassowary

SwiftCassowary
Carthage compatible
[SwiftCassowary]()
[Swift 4.0]()

Cassowary is a swift implement of constraint solving algorithm Cassowary which forms the core of the OS X and iOS Autolayout . This project is start from a direct port of rhea,but after that ,a lot of optimization has been added to make it performent better.

Requirements

  • iOS 8.0+
  • Swift 4.2
  • Xcode 10

    Installation

  • Carthage github "https://github.com/nangege/Cassowary" "master"
  • Manually – just drag this project file to your workspace

Then add Cassowary to Linked Frameworks and Libraries

import Cassowary

Usage

let v1 = Variable(),v2 = Variable, v3 = Variable()
let solver = SimplexSolver()
try? solver.add(v1 + v2 == 10)
try? solver.add(v1 - v2 == 2)
solver.solve()
print(solver.valueFor(v1)).  // 6
print(solver.valueFor(v2)).  // 4

Lisence

The MIT License (MIT)

Latest podspec

{
    "name": "SwiftCassowary",
    "version": "0.1-beta",
    "summary": "Swift implement of constraint solving algorithm",
    "description": "Cassowary is a swift implement of constraint solving algorithm Cassowary which forms the core of the OS X and iOS Autolayout . n* This library is heavily inspired by this c++ implement rhea",
    "homepage": "https://github.com/nangege/Cassowary",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "TangNan": "[email protected]"
    },
    "swift_version": "4.2",
    "platforms": {
        "ios": "8.0"
    },
    "module_name": "Cassowary",
    "source": {
        "git": "https://github.com/nangege/Cassowary.git",
        "tag": "0.1-beta"
    },
    "source_files": [
        "Cassowary/Sources/*.swift",
        "Cassowary/Cassowary.h"
    ],
    "public_header_files": [
        "Cassowary/Cassowary.h"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This