This pod offers some handy attributes to KeepLayout for Swift (see the swift-legacy branch) to make it easier to use.
SwiftKeepLayout is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SwiftKeepLayout"
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)
Tancrède Chazallet, please use GitHub issue system if you wish to contact me about this repository.
SwiftKeepLayout is available under the MIT license. See the LICENSE file for more info.