I miss WPF / Silverlight’s auto-layout controls (like StackPanel and Grid) when writing the equivalent UI for iOS using MonoTouch.
I’m hoping that instead of reinventing the wheel, someone has already created these 🙂
I’ve found a stackpanel for iOS github project but being a newbie to MonoTouch, I’m not sure how I would integrate the Obj-C code into the Mono project.
The stackpanel code seems based on
UITableViewand offers a simpler API for a specific case.In general you can compile existing objective-c into a library (using Xcode) and create managed bindings for it. However in this case the code looks quite small so it might even be easier to translate to C# (and provide an API closer to Silverlight’s StackPanel).
But I strongly suggest you to look at MonoTouch.Dialog which offers you a simpler API for tables, including support for owner-drawn elements. It’s also very easy to extend (using C#) to create your own elements. See the Sample project to see them in action.