Last active
August 29, 2015 14:06
-
-
Save smileyborg/96ca0e46b0fe1ae5161b to your computer and use it in GitHub Desktop.
PureLayout in Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func setupConstraints() | |
{ | |
let views: NSArray = [view1, view2, view3] | |
views.autoDistributeViewsAlongAxis(.Horizontal, withFixedSpacing: 10.0, insetSpacing: true, matchedSizes: false, alignment: .AlignAllTop) | |
// if you don't like creating an intermediate constant, the following works using Xcode 6.1 GM: | |
[view1, view2, view3].autoDistributeViewsAlongAxis(.Horizontal, withFixedSpacing: 10.0, insetSpacing: true, matchedSizes: false, alignment: .AlignAllTop) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What bridging header did you use?