Posts

Post marked as unsolved
1.4k Views

NavigationLinks only work once?

Hi,I have the issue (on iOS/iPadOS) once a NavigationLink was tapped/used it won't trigger the navigation again after navigating back. The most minimal code example would be:struct ContentView: View { var body: some View { NavigationView { NavigationLink(destination: PushedView()) { Text("Press Me").font(.largeTitle) } } } struct PushedView: View { var body: some View { Text("Hello") } } }So once "Push Me" was tapped and the navigation triggered it won't work again after navigating back. (Only tested in simulator so far.) Am I missing something?Kind regards, Michael
Asked
by milutz.
Last updated .
Post marked as unsolved
164 Views

Workspace, multiple targets and previews

Hi,I am having the following issue with multiple targets in a workspace and SwiftUI previews and am wondering, if that's a bug or a feature?I have a workspace containing an iOS and a watchOS target. Both targets have a source file with the name "FooView.swift" in them, which implements the same UI (using SwiftUI of course), but specific for the particular platform. When trying to use SwiftUI previews after switching targets it only works after a full clean of the project. I assume this is because either the filenames or class names clash somewhere.The other issue I saw is that HostingController.swift filename (generted by Xcode) clashes with some generated HostingController.swift file used by the SwiftUI previews in the iOS target. To be clear the iOS target has no HostingViewController.swift. I assume it's generated to "host" the SwiftUI preview. After renaming only the file (not the class) to WatchHostingViewContoller.swift everything was working again.So I am wondering if that should be considered expected behaviour or bugs?Thank you, Michael
Asked
by milutz.
Last updated .
Post marked as unsolved
200 Views

Best Forum to discuss Combine questions?

Hi,so far it seems there is no dedicated forum for discussing Combine - at least I have not found one. Any suggestion what existing forum would be the best? SwiftUI?Cheers, Michael
Asked
by milutz.
Last updated .