Split View - Master and Navigation Bar don't appear on iPad ?

mikeacostamikeacosta ✭✭✭USUniversity ✭✭✭

I'm assigning the UISplitViewController as the app's RootViewController at runtime after some processing (authentication, user selection, etc).
I'm using multiple detail controllers - displayed controller is based on user selection from master controller's table.

Everything works as expected on an iPhone simulator and physical device.

On an iPad, it show's the default detail controller in the full screen, but the navigation bar isn't at the top, and there's no way to show the master.
If I don't assign a default detail controller, there's just a blank, gray screen on the iPad.

Any suggestions? Maybe something simple (but not so for an iOS noob). Thanks for any help.

Best Answer

  • mikeacostamikeacosta ✭✭✭ US ✭✭✭
    Accepted Answer

    @prashantvc My sol'n is in the attached image. I've added a nav controller for each detail. Each nav controller has a detail relationship with the split view controller and a root relationship to it's corresponding detail controller. Also, the table view cell has a show detail segue to each nav controller.

    For each master menu item selection, I'm doing a PerformSegue instead of ShowDetailViewController.

    I'm still trying to work out a nav bar link to show master when detail occupies the full screen, like in iPad portrait mode. I think there's a way with the UISplitViewController's displayModeButtonItem property.

Answers

  • prashantvcprashantvc Xamurai USXamarin Team Xamurai

    iPad in portrait mode will default to DetailsView, however you should see an option to show master view from the navigation page.

    but the navigation bar isn't at the top

    This is rather strange! Is it possible to send us the sample project demonstrating the problem? It will help us to troubleshoot the issue. When you send us the sample, the following folders can be deleted; as they will be updated automatically when you open/build it in the IDE:

    bin
    obj
    packages
    components

    Once you do this and zip the app's root folder it'll often be smaller than 1 MB, making it easy to send.

  • mikeacostamikeacosta ✭✭✭ USUniversity ✭✭✭

    Thank you @prashantvc Yes, where should I send the code?

    Also, this behavior also occurs in the lab 3 completed code for Xam U class IOS205 Navigation Patterns (the master/detail exercise). The nav bar only appears above the detail view on iPhone, not iPad.

    The master appears when swiping right on the detail view, but without the nav bar and chevron back button visible, it's not clear how to view the master.

  • prashantvcprashantvc Xamurai USXamarin Team Xamurai

    @mikeacosta you don't need send a code if can reproduce it with one of the XamU exercises.
    I will keep you updated on the progress

  • mikeacostamikeacosta ✭✭✭ USUniversity ✭✭✭
    Accepted Answer

    @prashantvc My sol'n is in the attached image. I've added a nav controller for each detail. Each nav controller has a detail relationship with the split view controller and a root relationship to it's corresponding detail controller. Also, the table view cell has a show detail segue to each nav controller.

    For each master menu item selection, I'm doing a PerformSegue instead of ShowDetailViewController.

    I'm still trying to work out a nav bar link to show master when detail occupies the full screen, like in iPad portrait mode. I think there's a way with the UISplitViewController's displayModeButtonItem property.

  • alinajetlyalinajetly USMember
    edited July 2017

    iPad Split view feature available in ios 11. Try this step : https://www.howtoisolve.com/fix-split-view-not-working-in-ios-on-ipad/
    See this Video :

Sign In or Register to comment.