Skip to content

Instantly share code, notes, and snippets.

@MarcosCobena
Last active December 22, 2016 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcosCobena/193a0ab48a77dea40744a8812248d586 to your computer and use it in GitHub Desktop.
Save MarcosCobena/193a0ab48a77dea40744a8812248d586 to your computer and use it in GitHub Desktop.
LayoutSubviews() needed for MyWrappingView to have dynamic height
public override void LayoutSubviews()
{
base.LayoutSubviews();
var availableWidth = _myWrappingView.Frame.Width;
_myWrappingView.SetPreferredMaxLayoutWidth((float)availableWidth);
base.LayoutSubviews();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment