SwiftUI equivalent of DesktopPagePanel

Howdy. Another Xojo refugee here :wink:

I actually decided to move away from Xojo back when WWDC25 came out. Xojo is already behind in the UI department when it comes to OS updates, and it seemed obvious to me they were never going to catch up now.

Anywho… I’ve been devouring Swift & SwiftUI books since then and so far it is going well (my original dev experience is C#). I’m focusing first on macOS apps and want to start building some proof of concept apps first. I did a lot of apps in Xojo utilizing the DesktopPagePanel and dynamic containers, which work well for what it is.

I realize I need to change my design thinking when it comes to SwiftUI or Storyboard apps, but is there a View element in SwiftUI (for macOS) that mimics the functionality of the DesktopPagePanel?

I think it might be NavigationStack, but I’m finding very few examples of this (that are not iOS related). Or do I just need to keep exploring NavigationSplitView?

It sure would be helpful if there was a visual guide to all the various SwiftUI views.

Thanks. Cheers!

1 Like

Because SwiftUI is declarative rather than a visual builder you can use an if statement or a switch statement to show and hide views like a Xojo PagePanel.

   switch currentPage {
   case 1:
        // page 1
   default:
        // page 0
   }

I made some SwiftUI articles available from our site SwiftUI Development - Ohanaware.com

2 Likes

open class ux$BASEPANEL : NSTabView,NSTabViewDelegate

this is the declaration for the base class I use for

open class uxPAGEPANEL : ux$BASEPANEL {

and

open class uxTABPANEL : ux$BASEPANEL {

also check out this topic I posted here a while back