Quantcast
Channel: Controls – TAGTECINFO
Viewing all articles
Browse latest Browse all 336

[iOS App Dev Libraries, Controls, Tutorials, Examples and Tools]Tiny Constraints – A Swift Library That Provides A Shorter Simpler Syntax For Using Auto Layout

$
0
0

Tiny Constraints is an open source Swift library Robert-Hein Hooijmans that provides syntactic sugar making Auto Layout easier to use.

Tiny Constraints was created to provide the shortest syntax for creating layouts and is 100% compatible with Auto Layout.  You can also store constraints to a variable, stack views together, and more.

This snippet from the readme shows how to create a height constraint, store it, and animate it:

let height = view.height(100)

height.constant = 200
UIViewPropertyAnimator(duration: 1, dampingRatio: 0.4) {
self.layoutIfNeeded()
}.startAnimation()

You can find TinyConstraints on Github here.

A nice library for working with Auto Layout in Swift.

Original article: Tiny Constraints – A Swift Library That Provides A Shorter Simpler Syntax For Using Auto Layout

©2017 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Reference source: iOS App Dev Libraries, Controls, Tutorials, Examples and Tools


Viewing all articles
Browse latest Browse all 336

Trending Articles