-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native MacOs app has strange behavior #8
Comments
Hi, thanks for raising this issue. I'm afraid |
If you look at the appkit, which for about 15 years still does not have the ability to change the view in one window (only open a new one), then it is very doubtful that this will appear in swiftui. However, if just remove the NavigationView, it works fine. But each time it creates a new one View, but does not clear the old from memory. I was able to solve this through the AnyView array, and made additional parameters for switching views as separate ViewModel parameters. |
@Higher08 not really a solution, but you can refer to this sample app from Apple for an alternative approach. In short navigation master/detail share a binding, and the detail screen changes based on that (no need to pop/push). I hope this helps! 🙌🏻 |
@zntfdr This approach is not navigation anyway. Yeah, I change view content but not |
@johnpatrickmorgan what approach would you recommend using your library if it's for an ipad app where sometimes is neccsary the navigationViewStyle(.columns) approach? |
Hi @igortxito! On macOS, you can have a coordinator whose root screen is the side bar, that pushes screens into the second (and possibly third) columns, e.g.: NavigationView {
MainCoordinator()
MiddleColumnPlaceholder()
RightColumnPlaceholder()
} where the However, on iPad, SwiftUI behaves rather strangely for the |
I use this library in MacOS SwiftUi;

And it doesn't change screens at the same position; it opens a new type of window. I don't think that's right
Here is screenshot
How can I fix this?
The text was updated successfully, but these errors were encountered: