Latest 1.0.5
Homepage https://github.com/sbrighiu/SnapConstraints
License Apache License 2.0
Platforms ios 9.0
Authors

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 added 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.

Latest podspec

{
    "name": "SnapConstraints",
    "version": "1.0.5",
    "summary": "A lightweight library for working with constraints programatically.",
    "description": "ALL YOU NEED TO DO IS .snap ;). Now working with Swift 4.nn# Useful information ahead:nn- Constraints are added as soon as they are created. n* Views who are subject to SnapConstraints have .translatesAutoresizingMaskIntoConstraints set to false automatically.n- This framework is optimized to hide as many negative values as possible. If a constraint is not shown properly, try setting the constant as a negative value, and maybe check if you are using the correct type of SnapConstraint. n* The SnapManager contains internal logging and SnapConstraints options. Please modify as you wish.n- The framework is build around SnapConstraintTypes and constraints can be created by accessing any child of UIView, and using the variable '.snap' to initiate the chaining of constraints and mask. Yup, chaining and masks, you heard right.n* All constraints created can be retrieved immediately by using the .snaps methods on the view they are added to.",
    "homepage": "https://github.com/sbrighiu/SnapConstraints",
    "license": {
        "type": "Apache License 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Stefan M. Brighiu (SMBCheeky)": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sbrighiu/SnapConstraints.git",
        "tag": "1.0.5"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "SnapConstraints/Classes/**/*"
}

Pin It on Pinterest

Share This