When I use screen layout split for an iPad layout, the left main contents not visible in portrait mode in the IDE and when I start my application on a real device or on simulator. When I run the application, I can swipe the left content to the right, but there is no hint for the customer, that the menu is hidden. Also I have some other iOS application with split layout, and there the left content is always visible. Is there any settings to show the left contents in portrait mode?
I believe there is an obscure declare that can help, but I never managed to make it work.
After some time facing this same question, what I did was to change the layout of the main window while the orientation was portrait.
(or use another window completely if the orientation changes)
I feel the time I spent doing that was worth it, because if Xojo ever sucessfully ships Android, and if iOS code can ever be re-used for it,
Android doesnt ‘do’ this split screen stuff so you will likely need a single screen layout anyway.
iOSdesignExtensions has a feature for this.
Sorry I’m not at my Mac right now, I can’t remember the name of the method.
Yes, there is an extension available: SetDisplayModeXC
But this is not the solution. If I use this in the open event on the left or right (main) content, the left content is always not visible.
Here are the DisplayMode in Xcode
This shows, that “UISplitViewControllerDisplayMode.oneOverSecondary” should be the right one.
Still not at my Mac but I know it is possible, as both parts of the splitview are displayed in the Xojo LR app I made
I believe the correct enumeration value to use is oneBesideSecondary
If have added the new declarations (from Developers page) to
Protected Enum UISplitViewControllerDisplayMode
Automatic = 0
secondaryOnly = 1
oneBesideSecondary = 2
oneOverSecondary = 3
twoBesideSecondary = 4
twoOverSecondary = 5
twoDisplaceSecondary = 6
Maybe I call the function not at the right position or event in the application.
Left (Main) => ScrMainMenu
Right (Detail) => ScrMain
In the “Opening Event” in screen “ScrMainMenu”, I call this:
Also I have tried all values for 0 to 5, but with no success.
Now I have found the right way to call the function.Place it on the “Right (Detail) => ScrMain” in “Resize Event”. Then the application start with “main” and “detail” view.
Thank you for your help.
Many iOS navigation declares need to be called in the Activating or Resized event.
Calling them in the opening event has no effect.
This can be seen in the iOSdesignExtensions demo project.