** EXAMPLE CODE, MORE DOCUMENTATION etc. IS COMING IN THE NEXT COUPLE OF DAYS!! **
A programmatic approach to building Xamarin.iOS UIs with stack views and animations
Yes, it does. They also work quite well for many tasks, but I wanted to create more control (my way) and to include animations for the content inside the stack nodes. I also find coding fiddly (x, y, width, height) problems strangely amusing, so I wanted to create one myself.
- VerticalLayout
- HorizontalLayout
- Nested layouts inside other layouts
- Flex and absolute heights and widths
- Borders and padding commands for layouts and layout nodes
- Alignment commands for all controls inside layout nodes
- Works with any UIView based class (i.e. pretty much every UI control)
- Slide animations for controls on segues into / out of a storyboard
- Debug mode where you can see outlines of controls and nesting during development
// Create a new vertical layout, as wide as the screen, 150 points hight, with border indents
UIBuddyLayoutVertical vLayout = new UIBuddyLayoutVertical(View, 0, 150, 5, 5, 20, 0, 0);
// Create a UILabel 100 points wide and 20 points high
buddyLabel = new UIBuddyViewBase<UILabel>(vLayout, UIBuddyControlHelper.H1(new CGRect(0,0,100,20)));
// Add the Lable to the vertical layout with Flex of 1 (takes up the whole control)
vLayout.AddWithFlex(buddyLabel, 1);
// And set some control details (buddyLabel.Control is of type UILabel in this case)
buddyLabel.Control.Text = "Vita Ex Machina";
buddyLabel.Control.TextAlignment = UITextAlignment.Center;
buddyLabel.HorizontalAlign = Align.Center;