Posts

Post not yet marked as solved
0 Replies
565 Views
I do have an app with a sidebar where I place my main navigation. When I navigate from the sidebar my DetailView is shown next to the sidebar as it should. But when I want to navigate from my MainView to a DetailView it's not working. The view is only shown as an overlay. Is there any way I can navigate around my main window from the sidebar and from the main view itself? import SwiftUI @main struct NavigationTestApp: App {     var body: some Scene {         WindowGroup {             NavigationView {                 ContentView()                 MainView()             }         }     } } struct ContentView: View {     var body: some View {         List {             NavigationLink(                 destination: DetailView(),                 label: {                     Text("DetailView")                 })         }         .listStyle(SidebarListStyle())     } } struct MainView: View {     var body: some View {         NavigationLink(             destination: DetailView(),             label: {                 Text("Navigate") /* Navigation does not work properly here*/             })             .frame(width: 1280, height: 720)     } } struct DetailView: View {     var body: some View {         Text("DetailView")             .frame(width: 1280, height: 720)     } }
Posted
by Volker88.
Last updated
.
Post not yet marked as solved
0 Replies
497 Views
I'm currently developing an app for iOS and macOS using Catalyst. With the changes in Xcode 12 I'm considering moving everything into the new Multiplatform app template. When I created a new project using Multiplatform app including Tests I was surprised that I got only 2 test targets in my project. one for iOS and one for macOS. Both targets contain templates for UITest classes. Now I'm wondering where to put my UnitTests? Is it intended to put the unit tests into the macOS- / iOS-test target or better to create a separate UnitTest target and put everything there? Maybe even create a Framework Target with tests for my shared code?
Posted
by Volker88.
Last updated
.