Skip to content

Instantly share code, notes, and snippets.

@charlesmchen
Last active December 23, 2015 03:49
Show Gist options
  • Select an option

  • Save charlesmchen/6576334 to your computer and use it in GitHub Desktop.

Select an option

Save charlesmchen/6576334 to your computer and use it in GitHub Desktop.
// 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