MasterDetailPage & iPhone "Plus" Landscape

ChrisBoydChrisBoyd USMember ✭✭
edited May 2017 in Xamarin.Forms

I was wondering if there was a way to make the MasterDetailPage replicate something like the iPhone's native Mail app (seen below).

From what I've read, the iOS implementation of MasterDetailPage is based upon the UISplitViewController.

However, I'm having a two main issues:
1. It doesn't display the "split" view in Landscape on my iPhone 6 Plus. (Even when explicitly setting "SplitOnLandscape".)
2. The "Master" view doesn't seem to allow the child to be a NavigationPage. (Note: In the Mail app, each pane has its own tool/nav bar.)

Any ideas of how to resolve this?
Is there a way to possibly use platform-specific code to access the underlying UISplitViewController?

Tagged:

Answers

  • JulienRosenJulienRosen CAMember ✭✭✭✭

    On my iPad, the master detail view is always in split mode. Don't have a 6+ to test with.

    The Detail of a MasterDetail page can most definitely be a navigation page.

  • ChrisBoydChrisBoyd USMember ✭✭
    edited May 2017

    Yes, it splits on iPad.

    However, in Xcode, the default check is to see if the screen width exceeds a certain threshold (which the iPhone 6+ does in landscape) and it also displays the split mode then.

    I'm aware that the Detail can contain a NavigationPage, but I got errors when trying to nest a NavigationPage in the Master.

  • JulienRosenJulienRosen CAMember ✭✭✭✭

    the master is just a popout menu.

    you can't do any navigation on it.

  • ChrisBoydChrisBoyd USMember ✭✭

    @JulienRosen said:
    the master is just a popout menu.

    you can't do any navigation on it.

    As originally stated, I'd read a Xamarin dev state that the MasterDetailPage is based on a UISplitViewController on iOS.

    In iOS, each view can have its own NavigationController (like the Mail app).

    I'm aware that's not easily achievable through Xamarin.Forms, which is why I asked:

    Is there a way to possibly use platform-specific code to access the underlying UISplitViewController?

    Or has anyone (or would it even be possible to) made a custom, third-party Xamarin.Forms Page-type based on UISplitViewController that would allow this?

  • Mahmoud_KamelMahmoud_Kamel USMember ✭✭

    in Constructor just write:
    MasterBehavior = MasterBehavior.Popover;

Sign In or Register to comment.