A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:

Related tags

Layout Cartography
Overview

Cartography 📱 📐

Using Cartography, you can set up your Auto Layout constraints in declarative code and without any stringly typing!

In short, it allows you to replace this:

addConstraint(NSLayoutConstraint(
    item: button1,
    attribute: .Right,
    relatedBy: .Equal,
    toItem: button2,
    attribute: .Left,
    multiplier: 1.0,
    constant: -12.0
))

with this

constrain(button1, button2) { button1, button2 in
    button1.right == button2.left - 12
}

If you end up using Cartography in production, I'd love to hear from you. You can reach me through Twitter or email.

Installation

CocoaPods

To integrate Cartography into your Xcode project using CocoaPods, specify it in your Podfile:

target '<Your Target Name>' do
  pod 'Cartography', '~> 3.0'
end

Then, run the following command:

$ pod install

Usage

Call the constrain* function with your UIView or NSView instances as well as a closure in which you declare the constraints between the different attributes of your views:

constrain(view1, view2) { view1, view2 in
    view1.width   == (view1.superview!.width - 50) * 0.5
    view2.width   == view1.width - 50
    view1.height  == 40
    view2.height  == view1.height
    view1.centerX == view1.superview!.centerX
    view2.centerX == view1.centerX

    view1.top >= view1.superview!.top + 20
    view2.top == view1.bottom + 20
}

For every view on the left hand side of an equality or inequality operator, Cartography will automatically set its translatesAutoresizingMaskIntoConstraints property to false.

If the view is not controlled by you–for example if it belongs to a Apple-provided UIViewController class–you should take appropriate care when declaring its constraints.



Replacing constraints

You can capture multiple constraints in a group to then replace them with new constraints at a later point.

constrain(view) { view in
    view.width  == 100
    view.height == 100
}

let group = ConstraintGroup()

// Attach `view` to the top left corner of its superview
constrain(view, replace: group) { view in
    view.top  == view.superview!.top
    view.left == view.superview!.left
}

/* Later */

// Move the view to the bottom right corner of its superview
constrain(view, replace: group) { view in
    view.bottom == view.superview!.bottom
    view.right  == view.superview!.right
}

UIView.animate(withDuration: 0.5, animations: view.layoutIfNeeded)

For convenience, the constrain functions also returns ConstraintGroup instances:

let group = constrain(button) { button in
    button.width  == 100
    button.height == 400
}

Supported attributes

Cartography supports all built-in attributes as of iOS 8 and OS X 10.9, those are:

  • width
  • height
  • top
  • right
  • bottom
  • left
  • leading
  • trailing
  • centerX
  • centerY
  • baseline

as well as the iOS specific

  • firstBaseline
  • leftMargin
  • rightMargin
  • topMargin
  • bottomMargin
  • leadingMargin
  • trailingMargin
  • centerXWithinMargins
  • centerYWithinMargins
  • edgesWithinMargins

These can be further refined using the following operators: *, /, + and -.

Additionally, it supports convenient compound attributes that allow you to assign multiple attributes at once:

constrain(view) { view in
    view.size   == view.superview!.size / 2
    view.center == view.superview!.center
}
constrain(view) { view in
    view.edges == inset(view.superview!.edges, 20, 20, 40, 20)
}

Aligning multiple view

If you need to align multiple views by a common edge, you can use the align functions:

constrain(view1, view2, view3) { view1, view2, view3 in
    align(top: view1, view2, view3)
}

Which is equivalent to view1.top == view2.top; view2.top == view3.top. Similar variants exist for top, right bottom, left, leading, trailing, centerX, centerY and baseline.

Distributing views evenly

For distributing multiple views, either horizontally or vertically, you can use the distribute functions:

constrain(view1, view2, view3) { view1, view2, view3 in
    distribute(by: 10, horizontally: view1, view2, view3)
}

Which is equivalent to view1.trailing == view2.leading - 10; view2.trailing == view3.leading - 10.

Setting priorities

You can set the priorities of your constraints using the ~ operator:

constrain(view) { view in
    view.width  >= 200 ~ UILayoutPriority(100)
    view.height >= 200 ~ .required
}

Capturing constraints

Since the ==, >=, <= and ~ emit NSLayoutConstraint instances, you can capture their results if you need to refer to the layout constraints at a later time:

var width: NSLayoutConstraint?

constrain(view) { view in
    width = (view.width == 200 ~ 100)
}

Note that declaring compound attributes returns multiple constraints at once:

var constraints: [NSLayoutConstraint]?

constrain(view) { view in
    constraints = (view.size == view.superview!.size ~ .defaultLow)
}

Documentation

Read the documentation here. For more information, see the gh-pages branch.

* Since Xcode 11 and swift 5.1 the keyword constrain conflicts with the ones used by the CommonUISDK... so, Calling the function with the module name is necessary to make it work properly

e.g.: Cartography.constrain

If you're using it with Xcode 10.3 or earlier, you can still use it as it is, without the module name alongside the function.

Versioning

For Swift 3.x: Versions <= 1.1.0

For Swift 4.x: Versions >= 2.0.0

For Swift 5.x: Versions >= 4.0.0

Support

Please, don't hesitate to file an issue if you have questions.

About Cartography

Cartography was built by Robb Böhnke, is maintained by Orta Therox and was inspired by the excellent FLKAutoLayout by Florian Kugler.

Comments
  • Adding support to UILayoutGuide

    Adding support to UILayoutGuide

    This pull-request adds support in Cartography to use UILayoutGuides and improves Cartography to work with iOS 11.0 new features.

    There's a breaking change regarding UILayoutSupport as I made it simpler to constrain elements such as safeAreaLayoutGuide and general views. This breaking change reflects that you no longer will use topLayoutGuideCartography or bottomLayoutGuideCartography inside the constrain block but instead you pass a property of the view controller to the method (e.g. now named both car_topLayoutGuide and car_bottomLayoutGuide) so you can attach constraints to its height, top or bottom as anchors are specified by the documentation.

    There's also a convenience property in the new ViewProxy that allows you to directly access a brand new LayoutProxy corresponding to the safeAreaLayoutGuide in iOS 11.0 as suggested by @gsampaio .

    This should be able to close issues #268 and #267, and improve upon #207.

    I look forward to suggestions in how to improve this pull request. Thanks.

    opened by corujautx 17
  • Add ability to use topLayoutGuide, bottomLayoutGuide

    Add ability to use topLayoutGuide, bottomLayoutGuide

    iOS7 added the concept of top & bottomLayoutGuide. It would be nice to be able to use them to connect right under the UINavigationBar or upper the top of UITabBar. What do you think?

    enhancement 
    opened by gscalzo 17
  • Swift 3.0 Xcode 8.0 errors

    Swift 3.0 Xcode 8.0 errors

    When updating to xcode 8.0, i made a clean pod install of Cartography, but i'm getting hundreds of Type 'NSLayoutRelation' has no member 'lessThanOrEqual'

    And similar errors.

    Any idea on how to fix it?

    opened by tryadelion 13
  • Swift 3.0 compatible branch

    Swift 3.0 compatible branch

    I know it's very early days, but any idea when a branch migrated to Swift 3 will be available? Anyone depending on this lib (or any other Swift libs) is currently stuck not being able to build their projects with Xcode 8 until all dependent libs are also migrated to Swift 2.3 or 3.0 (preferable).

    opened by mluisbrown 13
  • Implicitly update layout after

    Implicitly update layout after "constrain" call?

    I had the follow difficulty:

    constrain(self.viewCircle, self.labelResult, self.viewDashed) { circle, label, dashed in
        // ...
                
        dashed.top == circle.bottom
        dashed.height == self.frame.height - viewCircle.frame.height // change the viewDashed.frame.height
        dashed.width == 1
    }
    
    // some code that use viewDashed.frame
    

    But, the code after constrain didn't work correctly, and I din't understand why.

    Then, I debug the code, and, different that I thought, the value of viewCircle.frame don't change after constrain, although the layout is changed. Then, I needed make some changes:

    constrain(self.viewCircle, self.labelResult, self.viewDashed) { circle, label, dashed in
        // ...
                
        dashed.top == circle.bottom
        dashed.height == self.frame.height - viewCircle.frame.height // change the viewDashed.frame.height
        dashed.width == 1
    }
    
    // viewDashed.frame.height -> 169.0
    
    viewDashed.setNeedsLayout()
    viewDashed.layoutIfNeeded()
    
    // viewDashed.frame.height -> 118.0
    
    // some code that use viewDashed.frame
    

    Exists any way better? Maybe, is a good idea implicitly to call setNeedsLayout and layoutIfNeeded for each value used in constrain?

    opened by macabeus 12
  • Add UILayoutSupport support

    Add UILayoutSupport support

    Hope you don't mind my taking a stab at this. It's based on the examples in https://github.com/robb/Cartography/issues/95 and admittedly it doesn't quite match the framework pattern, but it's here if you want it.

    opened by TimothyChilvers 12
  • Binary operator '==' cannot be applied to operands of type 'Dimension' and 'Float'

    Binary operator '==' cannot be applied to operands of type 'Dimension' and 'Float'

    I read in #36 and #56 that Cartography should be able to support floats, but I keep on receiving the error Binary operator '==' cannot be applied to operands of type 'Dimension' and 'Float' when I try this code:

            layout(button) { fabButton in
                button.right == button.superview!.right - 16
                button.bottom == button.superview!.bottom - 16
                button.height == Constants.height
                button.width == Constants.width
            }
    

    I have also tried it with CGFloat to no luck

    opened by WilliamHua 12
  • Reason: image not found

    Reason: image not found

    dyld: Library not loaded: @rpath/Cartography.framework/Cartography
    Referenced from: /var/mobile/Containers/Bundle/Application/F6522157-398D-4800-8130-91BFF616969F/Linguist.app/Linguist
    Reason: image not found
    

    How to fix it?

    opened by orkhanalizade 9
  • 🚨 Subtle changes in Layout Behavior 🚨

    🚨 Subtle changes in Layout Behavior 🚨

    @mergesort in chat, after upgrading to 1174be88d3:

    Not sure why, but all my other layouts are now messed up. I'm gonna file an issue. But it's not looking good..

    In Cartography 0.2.1, a constraint like

    lhs.top == rhs.top
    

    would only call setTranslatesAutoresizingMaskIntoConstraints(false) on lhs, regardless of whether that view is owned by a UIViewController.

    However, since 1174be88d3, the behavior subtly changed. setTranslatesAutoresizingMaskIntoConstraints(false) is now called on both lhs and rhs, as long as they are not the view of a UIViewController.

    It only makes sense that == is symmetric, since that is a requirement of equality relations. However, Cartography constrain blocks commonly look like this:

    let view == // a UIViewController.view's direct child
    constrain(view) {
        view.top == view.superview!.top
    }
    

    That is, if a UIViewController.view was to show up in a constraint, it would commonly be the on right hand side and thus not have its autoresizing mask translation disabled. Unfortunately, UIViewController appears to depend on that being active, which required #89 in the first place.

    It would be great if users of Cartography could try their code against the latest master, currently 8b2a52d9e0 to see if they are affected by this and check, if they can reasonably work with the new behavior.

    opened by robb 9
  • Using a constant

    Using a constant

    I'm trying to use a constant to specify how much of a margin i want to use.

    let margin = 10.0

    label.top == label.superview!.top + margin

    I can't get this to work no matter how I cast margin. Am I missing something?

    opened by mwhuss 8
  • Assign value from variable

    Assign value from variable

    Probably I am just not going about this the right way:

    let imgHeight = apiData.bgImage.height  // 80.0
    constrain(self.imgView) { view in
        view.height == imgHeight
    }
    

    Leads to

    Cannot convert value of type 'Dimension' to expected argument type 'Int'

    Is there a way to make this work? If not I'll just fallback to a regular NSLayoutConstraint. Would be great if one could make this work though :)

    opened by originell 7
  • speed of == operator overload

    speed of == operator overload

    Hello, new to Cartography but I work at a company with a large iOS codebase and they have forked it and replaced == with ~==. Why? Because they found the speed increase in xcode a huge win. i.e. because xcode is doing extra stuff with the normal == (trying to apply normal rules to left and right side of the operator) it slows down a lot once you have > N lines of code.

    I suspect many users of Cartography would never notice this speed issue unless their codebase is very large. But wondering if anyone else has seen this and if there is any plan move away from the == ?

    Thanks!

    opened by andrewarrow 6
  • Build is not working

    Build is not working

    Currently, the project has iOS 8.0 as a minimum deployment target. However, one of the dependencies, Nimble, requires iOS 9 as a minimum target. Do we have any impediments to change the project's target to iOS 9? If not, I can open a PR doing that.

    opened by gsalibi 0
  • Cartography is still awesome 2021-01

    Cartography is still awesome 2021-01

    After switching from Carthage to Cocoapods recently, I thought I'd remove Carthage from my code, too.

    After remembering to shut off translatesAutoresizingMaskIntoConstraints, I was able to start converting in earnest. However... without Cartography, autolayout code is way more verbose and also much harder to read.

    So... thanks for keeping Cartography up-to-date. It's brilliant.

    opened by drosenstark 0
  • Xcode12.1 deprecated warning

    Xcode12.1 deprecated warning

    LayoutSupport.swift

        public extension UIViewController {
            var car_topLayoutGuide : LayoutSupport {
                get {
                    return LayoutSupport(layoutGuide: self.topLayoutGuide)
                }
            }
            
            var car_bottomLayoutGuide : LayoutSupport {
                get {
                    return LayoutSupport(layoutGuide: self.bottomLayoutGuide)
                }
            }
        }
    

    'topLayoutGuide' was deprecated in iOS 11.0: Use view.safeAreaLayoutGuide.topAnchor instead of topLayoutGuide.bottomAnchor

    'bottomLayoutGuide' was deprecated in iOS 11.0: Use view.safeAreaLayoutGuide.bottomAnchor instead of bottomLayoutGuide.topAnchor

    opened by rshimokura 0
  • How to use multiply

    How to use multiply

    I not found example with working multiply solution. On next my code:

      constrain(view, searchImage, coverLabel) { (view, searchImage, coverLabel) in
                searchImage.top == (view.height * CGFloat(0.59))
                searchImage.centerX == view.centerX
                searchImage.leading >= view.safeAreaLayoutGuide.leading + 12.0
                searchImage.trailing <= view.safeAreaLayoutGuide.trailing - 12.0
                coverLabel.top == searchImage.bottom + 32.0
            }
    

    I got next compile error:

    Build target AppTest
    Compile Swift source files
    Compile ViewController.swift
    (178, 29) Binary operator '==' cannot be applied to operands of type 'Edge' and 'Expression<Dimension>'
    (178, 29) Overloads for '==' exist with these partially matching parameter lists: (P, Expression<P>), (P, P)
    Build failed with 1 error and 143 warnings in 43 s 83 ms
    

    How work correctly with it?

    opened by bimawa 0
Releases(4.0.0)
  • 4.0.0(May 10, 2019)

  • 3.0.1(Nov 22, 2017)

    This release comes entirely from @corujautx

    • Discontinuation of the support for macOS < 10.10: The reason I did this is because Cartography 3.0 makes use of the isActive property on constraints and no longer has views to attach to a context like in previous versions, as those contained traversal of view hierarchy to identify where to attach a constraint as previous APIs did. It makes no sense to support 10.9 because Cartography is already targeted to iOS 8.0 onwards which supports this new API. This should "fix" #274.

    • Extending support to NSLayoutGuide: A missing feature in the release of Cartography 3.0 was the support of NSLayoutGuides in macOS. This is now supported!

    • Improvements to insetting edges: I added a more expressive way to inset edges in expressions. The way you would currently do this would be expressing view.edges == inset(view.superview!.edges, 10) which would now can also be expressed by view.edges == view.superview!.edges.inseted(by: 10) which makes a lot more expressive.

    • Supporting other layout guides included in UIView: UIView also includes references to other layout guides that are used to define standard layout margins or readable content margins. These now can be used in Cartography by expressing for example: view.edges == view.superview!.readableContentGuide.edges

    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Oct 31, 2017)

    Now you can pass in layout guides to constrain - so code like:

    constrain(view) { view in 
        view.top == vc.topLayoutGuideCartography
    }
    

    should change to:

    constrain(view, vc.car_topLayoutGuide) { view, guide in 
         view.top == guide.bottom
    }
    

    This adds more flexibility as you can also now constrain to the top/height attributes of an UILayoutSupport.

    The whole idea for 3.0 is to unify UIView (or NSView in macOS), UILayoutGuide and UILayoutSupport as constrainable elements, represented by the protocol LayoutElement. 👍

    The credit goes to @corujautx

    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Oct 18, 2017)

  • 1.0.1(Oct 3, 2016)

    • @NachoSoto added full module optimization
    • @JohnCoates fixed a Swift 3.0 compiler bug with setting priorities
    • @strangeliu made "replaceGroup" an optional parameter
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Sep 25, 2016)

  • 0.7.0(Sep 13, 2016)

    • Compatibility with Swift 2.3 (#221)
    • tvOS target (#180, #192)
    • Bitcode support (#175)
    • Support for UILayoutSupport (#203)
    • Allow insetting edges using UIEdgeInsets (#211)
    • Added the lastBaseline property to LayoutProxy (#184)
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Sep 18, 2015)

    • Removed the layout function. This is a breaking change and users are now required to invoke a layout pass manually as needed. (#144)
    • Compatibility with Swift 2.0

    Thanks to @JaviSoto for fixing build errors :sparkling_heart:

    Source code(tar.gz)
    Source code(zip)
  • 0.6.0-beta1(Sep 10, 2015)

    • Removed the layout function. This is a breaking change and users are now required to invoke a layout pass manually as needed. (#144)
    • Compatibility with Swift 2.0
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Apr 10, 2015)

  • 0.4.0(Apr 3, 2015)

    • Adds new, iPhone specific properties for working with layout margins. (#93)
    • Fixes a memory leak in the ?? operator by not using it. (#111)

    Thanks to @VincentWenShuo for bringing the leak to my attention. :sparkling_heart:

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Mar 28, 2015)

    • Adds constrain(clear:) and layout(clear:) to remove all layout constraints from a ConstraintGroup without having to add new ones. (#82)
    • Adds align in various versions to facilitate aligning multiple views by the same edge. (#84)
    • Adds distribute to evenly space out multiple views either horizontally or vertically. (#86)
    • Setting up a constraint between two views that don't share a common ancestor will now trigger an assertion. (#92)
    • Expressions or numerical constants can no longer be placed on the left hand side of the ==, <= or >= operators. While this is a breaking change, rewriting the declarations to only have a property on the left hand side should not be complicated. (#94)
    • Added plenty of documentation. (#102)
    • Fix a retain cycle that would prevent views from being deallocated. (#105)

    With kind contributions by @truppelito and @solomon23 :sparkling_heart:.

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0-beta1(Mar 22, 2015)

    This is the first beta version of Cartography 0.3.0

    • Adds constrain(clear:) and layout(clear:) to remove all layout constraints from a ConstraintGroup without having to add new ones. (#82)
    • Adds align in various versions to facilitate aligning multiple views by the same edge. (#84)
    • Adds distribute to evenly space out multiple views either horizontally or vertically. (#86)
    • Setting up a constraint between two views that don't share a common ancestor will now trigger an assertion. (#92)
    • Expressions or numerical constants can no longer be placed on the left hand side of the ==, <= or >= operators. While this is a breaking change, rewriting the declarations to only have a property on the left hand side should not be complicated. (#94)
    • Added plenty of documentation. (#102)

    Thanks @truppelito for the ConstraintGroup clearing methods :sparkling_heart:

    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Feb 11, 2015)

  • 0.2.0(Feb 5, 2015)

  • 0.1.1(Jan 4, 2015)

    Cartography is now (hopefully) compatible with CocoaPods for both Mac and iOS.

    Thanks to @DJBen for supplying the initial podspec. :sparkling_heart:

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Jan 3, 2015)

    The initial release of Cartography.

    With kind contributions by @GarthSnyder, @PiersonBro, @jamescmartinez, @brandonroth, @nschum and @devxoul. :sparkling_heart:

    Source code(tar.gz)
    Source code(zip)
Owner
Robb Böhnke
It's dangerous to go alone,​ take this: 🖤
Robb Böhnke
A compact but full-featured Auto Layout DSL for Swift

Mortar allows you to create Auto Layout constraints using concise, simple code statements. Use this: view1.m_right |=| view2.m_left - 12.0 Instead of:

Jason Fieldman 83 Jan 29, 2022
Yet Another Swift Auto Layout DSL

FormationLayout Documentation FormationLayout is the top level layout class for one root view. FormationLayout takes a UIView as its rootView. transla

Evan Liu 53 Mar 31, 2022
Swifty DSL for programmatic Auto Layout in iOS

WWLayout Easy to write auto layout constraints, with minimal extensions to standard namespaces. Feature Highlights Easy to use, readable API Backwards

WW Tech 49 Oct 2, 2022
Lightweight declarative auto-layout framework for Swift

SwiftyLayout SwiftyLayout is a framework that allows to describe layout constraints (ie NSLayoutConstraint) as a simple mathematical formula in a Swif

Hisakuni Fujimoto 15 Nov 7, 2017
Declarative Auto Layout in Swift, clean and simple

Tails Tails is a take on declarative Auto Layout. If you don't like typing (like me), it might be your kind of thing! Tails is written in Swift and cu

Nick Tymchenko 17 Jan 31, 2019
⚓️ Declarative, extensible, powerful Auto Layout

EasyAnchor ❤️ Support my apps ❤️ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut m

Khoa 449 Nov 10, 2022
Auto Layout (and manual layout) in one line.

Auto Layout (and manual layout) in one line. Quick Look view.bb.centerX().below(view2).size(100) It’s equivalent to iOS 9 API: view.centerXAnchor.cons

Javier Zhang 74 Oct 19, 2022
Auto Layout made easy with the Custom Layout.

Auto Layout made easy with the Custom Layout. Getting started CocoaPods CocoaPods is a dependency manager for Cocoa projects. You can install it with

Malith Nadeeshan 1 Jan 16, 2022
A declarative UIKit for improve layout productivity when developing an iOS application

TifoKit A declarative UIKit for improve layout productivity when developing an iOS application Requirements Min. iOS 11 Swift 5+ Installation Currentl

Tifo Audi A.P 22 Aug 9, 2022
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]

Extremely Fast views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainabl

layoutBox 2.1k Dec 22, 2022
Lightweight Swift framework for Apple's Auto-Layout

I am glad to share with you a lightweight Swift framework for Apple's Auto-Layout. It helps you write readable and compact UI code using simple API. A

null 349 Dec 20, 2022
The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. Objective-C and Swift compatible.

The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. PureLayout extends UIView/NSView, NSArray, and NSLayoutConstrai

PureLayout 7.6k Jan 6, 2023
Auto Layout In Swift Made Easy

Swiftstraints Swiftstraints can turn verbose auto-layout code: let constraint = NSLayoutConstraint(item: blueView, attr

null 119 Jan 29, 2022
Minimal Auto Layout in Swift

Restraint Restraint is a very very small library to help make your use of NSLayoutConstraint in Swift more legible & declarative. Like programmatic vi

The Puffin Supply Project 80 Aug 23, 2022
Swift microframework for declaring Auto Layout constraints functionally

Relayout Relayout is a Swift microframework to make using Auto Layout easier with static and dynamic layouts. Why? If you want to build a UI using App

Steve Streza 560 Nov 19, 2022
SuperLayout is a Swift library that makes using Auto Layout a breeze.

SuperLayout is a library that adds a few custom operators to Swift that makes using the amazing NSLayoutAnchor API for Auto Layout a breeze. SuperLayo

Lionheart Software 53 Oct 12, 2022
Written in pure Swift, QuickLayout offers a simple and easy way to manage Auto Layout in code.

QuickLayout QuickLayout offers an additional way, to easily manage the Auto Layout using only code. You can harness the power of QuickLayout to align

Daniel Huri 243 Oct 28, 2022
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast

Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]

layoutBox 2.1k Jan 2, 2023
Auto Layout made easy

EasyPeasy is a Swift framework that lets you create Auto Layout constraints programmatically without headaches and never ending boilerplate code. Besi

Carlos Vidal 1.9k Dec 23, 2022