EZLayout alternatives and similar libraries
Based on the "Auto Layout" category.
Alternatively, view EZLayout alternatives based on common mentions on social networks and blogs.
SnapKit9.9 2.5 L3 EZLayout VS SnapKitA Swift Autolayout DSL for iOS & OS X
PureLayout9.7 0.0 L4 EZLayout VS PureLayoutThe ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. Objective-C and Swift compatible.
Cartography9.7 1.0 L5 EZLayout VS CartographyA declarative Auto Layout DSL for Swift :iphone::triangular_ruler:
TinyConstraints9.2 0.0 L4 EZLayout VS TinyConstraintsNothing but sugar.
EasyPeasy8.3 0.0 L4 EZLayout VS EasyPeasyAuto Layout made easy
SwiftAutoLayout6.1 0.0 L5 EZLayout VS SwiftAutoLayoutTiny Swift DSL for Autolayout
EasySwiftLayout4.6 0.0 EZLayout VS EasySwiftLayoutLightweight Swift framework for Apple's Auto-Layout
MisterFusion4.5 0.0 L5 EZLayout VS MisterFusionMisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.
Cupcake4.5 0.0 EZLayout VS CupcakeAn easy way to create and layout UI components for iOS (Swift version).
QuickLayout4.1 1.3 EZLayout VS QuickLayoutWritten in pure Swift, QuickLayout offers a simple and easy way to manage Auto Layout in code.
DeviceLayout3.4 0.0 EZLayout VS DeviceLayout📱AutoLayout can be set differently for each device
VFLToolbox3.0 0.0 L4 EZLayout VS VFLToolboxfancy Swift implementation of the Visual Format Language.
Swiftstraints3.0 0.0 L5 EZLayout VS SwiftstraintsAuto Layout In Swift Made Easy
HypeUI2.7 10.0 EZLayout VS HypeUI🌺 HypeUI is a implementation of Apple's SwiftUI DSL style based on UIKit
Cassowary2.6 0.0 EZLayout VS CassowaryA Swift port of the Cassowary linear constraint solver
KVConstraintKit2.5 0.0 EZLayout VS KVConstraintKitAn Impressive Auto Layout DSL for iOS, tvOS & OSX. & It is written in pure swift.
Restraint2.3 0.0 L5 EZLayout VS RestraintMinimal Auto Layout in Swift
Mortar2.3 0.0 L2 EZLayout VS MortarA compact but full-featured Auto Layout DSL for Swift
Bamboo2.0 0.0 EZLayout VS BambooAuto Layout (and manual layout) in one line.
WWLayout1.8 0.0 EZLayout VS WWLayoutSwifty DSL for programmatic Auto Layout in iOS
FrameLayoutKit1.5 2.5 EZLayout VS FrameLayoutKitFrameLayoutKit is a super fast and easy to use autolayout kit
FormationLayout1.4 0.0 L4 EZLayout VS FormationLayoutYet Another Swift Auto Layout DSL
NorthLayout1.0 0.0 EZLayout VS NorthLayoutThe fast path to autolayout views in code
AutoLayoutPlus0.9 0.0 L5 EZLayout VS AutoLayoutPlusA bit of steroids for AutoLayout, powered by Swift.
SwiftyLayout0.6 0.0 L5 EZLayout VS SwiftyLayoutLightweight declarative auto-layout framework for Swift
Tails0.5 0.0 L5 EZLayout VS TailsDeclarative Auto Layout in Swift, clean and simple
Draftsman0.4 7.8 EZLayout VS DraftsmanDraftsman is a Layout builder based on AutoLayout with Declarative approach
Swift-iOS-Localize-Constraint0.3 0.0 L5 EZLayout VS Swift-iOS-Localize-Constraintlocalize constraint on the fly
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of EZLayout or a related project?
An easier way to code Autolayout
- [x] Are you annoyed of coding
.active = truewhile using Autolayout Anchors over and over again?
- [x] Are you annoyed of coding such long constraint sentence
refreshView.heightAnchor.constraint(equalToConstant: self.refreshViewHeight).isActive = trueover and over again?
EZAnchor is definitely going to shorten your time of writing Autolayout Anchors by a simple installation.
Let's see how it works:
- Anchor constraint to another anchor ```swift //Traditional way viewA.leadingAnchor.constraint(equalTo: viewB.leadingAnchor).isActive = true
//With EZAnchor viewA.leading == viewB.leading
* Anchor constraint to another anchor with constant ```swift //Traditional way viewA.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 10).isActive = true //With EZAnchor viewA.leading == self.view.leading + 10
- Anchor constraint to another anchor with negative constant ```swift //Traditional way viewA.leadingAnchor.constraint(equalTo: viewB.leadingAnchor, constant: -10).isActive = true
//With EZAnchor viewA.leading == viewB.leading - 10
* Anchor lessThanOrEqualTo another anchor ```swift //Traditional way viewA.leadingAnchor.constraint(lessThanOrEqualTo: viewB.leadingAnchor).isActive = true //With EZAnchor viewA.leading <= viewB.leading
- Anchor greaterThanOrEqualTo another anchor ```swift viewA.leadingAnchor.constraint(greaterThanOrEqualTo: viewB.leadingAnchor).isActive = true
//With EZAnchor viewA.leading >= viewB.leading
* Anchor lessThanOrEqualTo another anchor with constant ```swift viewA.leadingAnchor.constraint(lessThanOrEqualTo: viewB.leadingAnchor, constant: 10).isActive = true //With EZAnchor viewA.leading <= viewB.leading + 10
- Anchor greaterThanOrEqualTo another anchor with constant ```swift //Traditional way viewA.leadingAnchor.constraint(greaterThanOrEqualTo: viewB.leadingAnchor, constant: 10).isActive = true
//With EZAnchor viewA.leading >= viewB.leading - 10
* Anchor equalTo another anchor with constant and multiplier ```swift //Traditional way viewA.heightAnchor.constraint(equalTo: viewB.heightAnchor, multiplier: 0.1, constant: -10).isActive = true //With EZAnchor viewA.height == viewB.height * 0.1 - 10
- Work with Priority
swift //With EZAnchor viewA.leading == (viewB.leading + 0.1) ^ .defaultLow
Drag and drop
EZAnchor and drop into your Xcode project.
To integrate EZAnchor into your Xcode project using CocoaPods, specify it in your Podfile:
target 'MyApp' do pod 'EZAnchor' end
To integrate EZAnchor into your Xcode project using Carthage, specify it in your Cartfile:
Run carthage update to build the framework and drag the built EZAnchor.framework into your Xcode project.
You can easily implement the following layout with very simple and clean code:
//set viewA's layout constraints let viewA = UIView() viewA.backgroundColor = UIColor.red view.addEZSubview(viewA) viewA.leading == view.leading + 5 viewA.trailing == view.trailing - 5 viewA.top == view.top + 15 viewA.centerX == view.centerX viewA.height == view.height/2 //set viewB's layout constraints let viewB = UIView() viewB.backgroundColor = UIColor.yellow view.addEZSubview(viewB) viewB.top == viewA.bottom + 5 viewB.leading == viewA.leading viewB.bottom == view.bottom - 5 viewB.trailing == view.centerX - 5 //set viewC's layout constraints let viewC = UIView() viewC.backgroundColor = UIColor.green view.addEZSubview(viewC) viewC.top == viewB.top viewC.bottom == viewB.bottom viewC.leading == view.centerX + 5 viewC.trailing == viewA.trailing
Chaining way to code Autolayout with EZAnchor
viewA.setLeading(view.leading + 5) .setTrailing(view.trailing - 5) .setTop(view.top + 15) .setCenterX(view.centerX) .setHeight(view.height/2) viewB.setTop(viewA.bottom + 5) .setLeading(viewA.leading) .setBottom(view.bottom - 5) .setTrailing(view.centerX - 5) viewC.setTop(viewB.top) .setBottom(viewB.bottom) .setLeading(view.centerX + 5) .setTrailing(viewA.trailing)
Better to have some basic concept of anchors, familiar with coding anchors programmatically. If not please learn from this link : Programmatically Creating Constraints!
Avoid defining custom
UIControlor view has same name with
width, there may have conflict with
WTF Autolayout will help you debug autolayout complaints.
Logo is generated with Shopify logo maker
Inspired by: PureLayout Stevia layout
- [ ] Unit tests
- [ ] UI Tests
- [ ] CI
- [ ] Fastlane
This code and tool is under the MIT License.
*Note that all licence references and agreements mentioned in the EZLayout README section above are relevant to that project's source code only.