Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

EasyLayout-Swift

Easy to use AutoLayout.

Subscribe to updates I use EasyLayout-Swift


Statistics on EasyLayout-Swift

Number of watchers on Github 87
Number of open issues 0
Main language Swift
Open pull requests 0+
Closed pull requests 0+
Last commit almost 3 years ago
Repo Created over 3 years ago
Repo Last Updated over 1 year ago
Size 838 KB
Organization / Authoraugustrush
Contributors1
Page Updated
Do you use EasyLayout-Swift? Leave a review!
View EasyLayout-Swift activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating EasyLayout-Swift for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

EasyLayout

Easy to use Autolayout for iOS/tvOS/OSX, easier is stronger.

Objective-C version

https://github.com/AugustRush/EasyLayout

Demo GIf

How to use

Code
firstView.remakeConstraints { (make) in
    make.ELAllEdges.equalTo(0)
}

secondView.remakeConstraints { (make) in
    make.ELAllEdges.equalTo(40,40,-40,-40)
}

thirdView.remakeConstraints { (make) in
    make.ELAllEdges.equalTo(80,80,-80,-80)
}

fouthView.remakeConstraints { (make) in
    make.ELAllEdges.equalTo(120,120,-120,-120)
}

Code
firstView.remakeConstraints { (make) in
    make.ELLeft == 10
    make.ELTop == 10
    make.ELSize.equalTo(self.view).mutipliers(0.5).constants(-30)
}

secondView.remakeConstraints { (make) in
    make.ELTop == 10
    make.ELRight == -10
    make.ELSize.equalTo(self.firstView)
}

thirdView.remakeConstraints { (make) 
    make.ELTop == self.firstView.ELBottom + 10
    make.ELLeft == 10
    make.ELSize.equalTo(self.firstView)
}

fouthView.remakeConstraints { (make) in
    make.ELTop == self.secondView.ELBottom + 10
    make.ELRight == -10
    make.ELSize.equalTo(self.firstView)
}

Next to do

add combination attributes method
More Easier?(how to do???)
file -> UIView

License (MIT)

Copyright (c) 2016 

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
EasyLayout-Swift list of languages used
Other projects in Swift