Skip to content

AncAinu/SwiftKeepLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

SwiftKeepLayout add some handy attributes to KeepLayout for swift usage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published