Split View - Handling master in Portrait mode

iPad
Split View
Portrait mode.

===========
Firstly, I found that if the app is opened in Portrait mode, the detail view is instantiated, but the Master is not.
I solved that by checking whether it is nil when the Detail opens:

try
  self.ParentSplitView.master = new MasterScreen
catch
end try

=====================

My Problem/Question

If the Master is dragged open from the left, I would like one of my detail screens to slide over to the right at the same time so that some data can be accessed.
Is that possible, or is the Detail always ‘disabled’ while the Master is visible?

As far as I know this is the case when in portrait mode, yes. If you have a tool button that you can press or a gesture recognizer for a swipe, you can “emulate” a master view by showing a container that has the contents you want on the left side of the screen.

Damn.
Wish I had known that before I started.
I may as well have done a ‘faux’ master detail from day 1, as I now have a feeling there is no such thing on Android (if it ever shows up in Xojo) either.

Are you trying to get Master and Detail view display at the same time when iPad is in Portrait mode ?

Not any more.
I was.
And I wanted the detail pane to change size/ slide to the right.
Neither works so I have come up with another solution by creating a miniature panel of tools that is only visible when in portrait mode

For your information, it is actually possible to display both Master and Detail when in Portrait mode.
This is what I do in the Xojo Language reference app: https://apps.apple.com/app/id1484982467

Using iOSDesignExtensions setDisplayMode method.

Or this method in a module:

Public Sub SetDisplayModeXC(Extends scr As iOSSplitView, mode As ViewExtensionsXC.UISplitViewControllerDisplayMode)
  //Changes the SplitView in portrait mode
  
  Declare Sub setPreferredDisplayMode Lib "UIKit" _
  selector "setPreferredDisplayMode:" (obj As Ptr, mode As UISplitViewControllerDisplayMode)
  
  setPreferredDisplayMode(scr.ViewControllerHandle, mode)
  
End Sub

And this enumeration:

Protected Enum UISplitViewControllerDisplayMode
Automatic = 0
PrimaryHidden
AllVisible
PrimaryOverlay
End Enum

This is the result:

1 Like

Interesting.
I’ll play with this…