SnapConstraints 1.0.5

SnapConstraints 1.0.5

TestsTested
LangLanguage SwiftSwift
License Apache-2.0
ReleasedLast Release May 2019
SPMSupports SPM

Maintained by SMBCheeky.



  • By
  • Stefan M. Brighiu (SMBCheeky)

SnapConstraints

Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

SnapConstraints is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SnapConstraints"

Description

Just use .snap on any UIView subclass and choose from simple options like .bottom , .top, .below or a bit more complex options like masks .snap.mask([.fill]).

To snap to the superview's safeArea use .leadingToSafeArea, .topToSafeArea, .bottomToSafeArea, .trailingToSafeArea. These constraints cannot be stacked or present in current masks like the rest because they are simple constraints.

All options will automatically activate the constraint/s and will return the last set constraint.

Author

Stefan M. Brighiu (SMBCheeky), [email protected]

License

SnapConstraints is available under the Apache License 2.0 license. See the LICENSE file for more info.