NSLayoutConstraint extension for pixel perfect designs
- Change constraint size according to device ratio
- Change constraint value for specific device size
- iOS 10.0+
- Xcode 8.0
Add TJLayoutHelper to your project
@IBOutlet weak var consBlueViewTop: TJLayoutHelper!
func modifyConstraintAccordingToScreenSize()
{
// Apply ratio
consBlueViewTop.applyRatio = true
// OR add space for specific screen size
consBlueViewTop.inch5_5Space = 20
consBlueViewTop.XSpace = 30
}
- Add support for landscape orientation
Don't use apply ratio and extra space togather
We would love you for the contribution to TJLayoutHelper, check the LICENSE
file for more info.
Tejas Ardeshna – @tejas_ardeshna, iOS developer at Simform solutoions PVT. LTD.
Distributed under the MIT license. See LICENSE
for more information.