Open josephktcheung opened 2 years ago
Thanks for raising this issue @josephktcheung. I really wish macOS would support StackNavigationViewStyle
, it seems strange that it doesn't. Hopefully that will come soon. If I understand correctly, you're suggesting that FlowStacks could reproduce the stack
style for macOS, or at least allow some customisation hooks so that a user could do so. I think that would be very tricky to get right, and would become obsolete if Apple do bring StackNavigationViewStyle
to macOS. I don't think it fits into the scope of FlowStacks, which is intended to be quite lightweight. I had a look at Stinson, but I'm not sure that that library offers a solution to this problem either. I'll keep the problem in mind in case a solution presents itself though.
In the meantime, would Mac Catalyst allow you to build your macOS app in the way you want? Or might it work to use sheet presentation for the macOS app instead? Not great solutions I'm afraid but fingers crossed macOS gets a bit more SwiftUI love soon!
Hi @johnpatrickmorgan, thanks for replying. We tried Mac Catalyst first but hit various limitations such that we are exploring to build a native MacOS app using SwiftUI e.g. TextKit 2 fully supported in MacOS but UITextView with TextKit 2 is not available in iOS 15., menu bar support etc (https://www.highcaffeinecontent.com/blog/20220216-Where-Mac-Catalyst-Falls-Short)
I haven't tested Stinsen thoroughly, perhaps I'll make a demo project and see how to create a custom navigation flow using it. At least from its documentation it says we can create our own Coordinatables / Coordinators:
Stinsen comes with a couple of Coordinatables for standard SwiftUI views. If you for instance want to use it for a Hamburger-menu, you need to create your own. Check the source-code to get some inspiration.
Hi,
We tried using TCACoordinators in our iOS and macOS app. Since macOS doesn't support
StackNavigationViewStyle
, I wonder if the library can be extensible so that it can wrap aNode
inside a custom view that can provide alternative navigation in macOS.I looked into some other SwiftUI navigation libraries and here's one that also uses coordinator pattern that allows user to define a custom coordinator https://github.com/rundfunk47/stinsen#defining-the-coordinator
Perhaps we can do something similar in this library as well?
Best, Joseph