Last active
December 23, 2015 03:49
-
-
Save charlesmchen/6576334 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // The most common way to use a stack layout is as a layout for a single subview. | |
| WeView *container = [[WeView alloc] init]; | |
| [[[container addSubviewWithCustomLayout:label] | |
| setMargin:5] | |
| setSpacing:5]; | |
| // It can also be used to stack multiple views on top of each other. | |
| WeView *container = [[WeView alloc] init]; | |
| [[[container addSubviewWithStackLayout:@[ | |
| label, | |
| imageView, | |
| button,] | |
| setMargin:5] | |
| setSpacing:5]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment