KGNAutoLayout makes AutoLayout easy!
github "kgn/KGNAutoLayout"
pod 'KGNAutoLayout'
view.pinToEdgesOfSuperview(withOffset: 20)view.pinToTopEdgeOfSuperview(withOffset: 20)view.pinToRightEdgeOfSuperview(withOffset: 20)view.pinToBottomEdgeOfSuperview(withOffset: 20)view.pinToLeftEdgeOfSuperview(withOffset: 20)view.pinToSideEdgesOfSuperview(withOffset: 20)view.pinToTopAndBottomEdgesOfSuperview(withOffset: 20)view.pinTopEdgeToTopEdge(of: itemView, withOffset: 20)view.pinRightEdgeToRightEdge(of: itemView, withOffset: 20)view.pinBottomEdgeToBottomEdge(of: itemView, withOffset: 20)view.pinLeftEdgeToLeftEdge(of: itemView, withOffset: 20)view.centerInSuperview()view.centerHorizontallyInSuperview()view.centerVerticallyInSuperview()[view1, view2, view3].centerHorizontally(to: parentView, withSeparation: 20)[view1, view2, view3].centerVertically(to: parentView, withSeparation: 20)view.centerHorizontally(to: itemView)view.centerVertically(to: itemView)view.size(toWidth: 80)view.size(toMinWidth: 40)view.size(toMaxWidth: 100)view.size(toHeight: 80)view.size(toMinHeight: 40)view.size(toMaxHeight: 100)view.size(toWidthAndHeight: 80)view.size(toMinWidthAndHeight: 40)view.size(toMaxWidthAndHeight: 100)view.sizeWidthToWidth(of: itemView)view.sizeHeightToHeight(of: itemView)view.sizeHeightToWidth(of: itemView)view.sizeWidthToHeight(of: itemView)view.sizeWidthAndHeightToWidthAndHeight(of: itemView)view.sizeHeightToWidth(withAspectRatio: 16/9)view.sizeWidthToHeight(withAspectRatio: 16/9)view.positionAbove(itemView, withOffset: 20)view.positionToTheRight(of: itemView, withOffset: 20)view.positionBelow(itemView, withOffset: 20)view.positionToTheLeft(of: itemView, withOffset: 20)[view1, view2, view3].positionAbove(itemView, withOffset: 20)[view1, view2, view3].positionToTheRight(of: itemView, withOffset: 20)[view1, view2, view3].positionBelow(itemView, withOffset: 20)[view1, view2, view3].positionToTheLeft(of: itemView, withOffset: 20)view.fitBetween(top: topView, andBottom: bottomView, withOffset: 20)view.fitBetween(left: leftView, andRight: rightView, withOffset: 20)parentView.fillHorizontally(withViews: [view1, view2, view3], separation: 20)parentView.fillVertically(withViews: [view1, view2, view3], separation: 20)itemView.boundHorizontally(withViews: [view1, view2, view3], separation: 20)itemView.boundVertically(withViews: [view1, view2, view3], separation: 20)itemView.boundVertically(withViews: [view1, view2, view3], separation: 20)- Travis
- Badges
- Tests
- Carthage
- CocoaPods
- Description
- Documentation
- Example App
- AppleTV
- Prebuilt Frameworks
- Travis Test Matrix
















































