Hello,
On my Xamarin.Forms project, I have a MasterDetailPage, where I have the need to swap the UISplitViewController for a custom control named MTSplitViewController. I need the exact same behaviour on the iPad as on the iPhone, and that is: the UISplitViewController needs to be collapsed on default on the iPad in landscape mode. This is kind of hard to do, because this is not the default behaviour of the UISplitViewController. Anyway, therefore I wanted to include the MTSplitViewController into my project and only use it when an iPad is used.
The code I have is:
[assembly: ExportRenderer(typeof(MasterPage), typeof(MasterPageRenderer), MonoTouch.UIKit.UIUserInterfaceIdiom.Pad)]
namespace iOS.Renderers
{
public class MasterPageRenderer : PageRenderer
{
protected override void OnElementChanged (VisualElementChangedEventArgs e)
{
base.OnElementChanged (e);
// There is no SetNativeControl() method..
// And I don't know which control to override
}
}
}
Does anybody know how to do this? And, if there is a better option to provide this kind of behaviour, please let me know!