Skip to content
SwiftKeepLayout add some handy attributes to KeepLayout for swift usage.
Objective-C Swift Ruby C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
Pod
.gitignore
.travis.yml
LICENSE
README.md
SwiftKeepLayout.podspec
_Pods.xcodeproj

README.md

SwiftKeepLayout

This pod offers some handy attributes to KeepLayout for Swift (see the swift-legacy branch) to make it easier to use.

Version License Platform

Installation

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

pod "SwiftKeepLayout"

Usage

Once installed, you can fully use KeepLayout + SwiftKeepLayout by doing, SwiftKeepLayout already include KeepLayout:

import SwiftKeepLayout

Then you can do stuff like:

// With KeepLayout
myView.keepTopInset.equal = KeepValueMake(CGFloat(30), Float(600))
// With SwiftKeepLayout
myView.keepTopInset.vEqual = (30, 600)

// With KeepLayout
myView.keepTopInset.required = 40.0
// With SwiftKeepLayout
myView.keepTopInset.vEqual = 40.0

// With KeepLayout
myView.keepTopInset.min = KeepHigh(20.0)
// With SwiftKeepLayout
myView.keepTopInset.vMin = (20.0, KeepPriorityHigh)

Author

Tancrède Chazallet, please use GitHub issue system if you wish to contact me about this repository.

License

SwiftKeepLayout is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.